{"id":1693,"date":"2024-12-02T05:52:20","date_gmt":"2024-12-02T05:52:20","guid":{"rendered":"https:\/\/blog.ezworkapp.com\/index.php\/2024\/12\/02\/power-query-cau-lenh-if-cho-logic-co-dieu-kien\/"},"modified":"2024-12-02T05:52:20","modified_gmt":"2024-12-02T05:52:20","slug":"power-query-cau-lenh-if-cho-logic-co-dieu-kien","status":"publish","type":"post","link":"https:\/\/blog.ezworkapp.com\/index.php\/2024\/12\/02\/power-query-cau-lenh-if-cho-logic-co-dieu-kien\/","title":{"rendered":"Power Query \u2013 C\u00e2u l\u1ec7nh If cho Logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n"},"content":{"rendered":"<div class=\"uk-panel uk-margin\" id=\"template-h4k0Fa0I#1\">\n<p><em><span style=\"font-weight: 400\">Trong b\u00e0i vi\u1ebft tr\u01b0\u1edbc, ch\u00fang ta \u0111\u00e3 c\u00f9ng t\u00ecm hi\u1ec3u s\u01a1 v\u1ec1 c\u00e1ch ho\u1ea1t \u0111\u1ed9ng c\u1ee7a Power Query<\/span><span style=\"font-weight: 400\">, b\u00e2y gi\u1edd <a href=\"http:\/\/blog.ezworkapp.com\/\"><strong>H\u1ecdc Excel Online<\/strong><\/a> c\u00f9ng b\u1ea1n s\u1ebd \u0111i s\u00e2u h\u01a1n m\u1ed9t ch\u00fat v\u00e0 hi\u1ec3u v\u1ec1 <a href=\"http:\/\/blog.ezworkapp.com\/power-query-cau-lenh-if-cho-logic-co-dieu-kien.html\"><strong>c\u00e2u l\u1ec7nh If Power Query<\/strong><\/a> nh\u00e9!<\/span><\/em><\/p>\n<p><span style=\"font-weight: 400\">Trong Excel, IF c\u00f3 th\u1ec3 n\u00f3i l\u00e0 m\u1ed9t h\u00e0m c\u1ed1t l\u00f5i, n\u00f3 l\u00e0 m\u1ed9t trong nh\u1eefng h\u00e0m \u0111\u1ea7u ti\u00ean ch\u00fang ta ph\u1ea3i h\u1ecdc. \u1ede b\u00e0i tr\u01b0\u1edbc ch\u00fang ta \u0111\u00e3 xem x\u00e9t <a href=\"http:\/\/blog.ezworkapp.com\/huong-dan-cach-dua-du-lieu-ve-dang-chuan-voi-power-query-trong-excel.html\"><strong>c\u00e1c H\u00e0m trong Power Query<\/strong><\/a> nh\u01b0ng ch\u01b0a \u0111\u1ec1 c\u1eadp \u0111\u1ebfn phi\u00ean b\u1ea3n Power Query c\u1ee7a h\u00e0m IF. Ch\u1eafc ch\u1eafn c\u00f3 m\u1ed9t h\u00e0m <\/span><b>if<\/b><span style=\"font-weight: 400\">\u2026 ph\u1ea3i kh\u00f4ng? \u2026 C\u00f3 l\u1ebd v\u1eady.<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u0110\u1ec3 s\u1eed d\u1ee5ng logic<\/span> <strong>if<\/strong><span style=\"font-weight: 400\"><strong>\u00a0Power Query,<\/strong> ch\u00fang ta c\u1ea7n m\u1ed9t ph\u01b0\u01a1ng ph\u00e1p d\u1ef1a tr\u00ean l\u1eadp tr\u00ecnh thay v\u00ec r\u00e0ng bu\u1ed9c ph\u01b0\u01a1ng ph\u00e1p d\u1ef1a tr\u00ean h\u00e0m m\u00e0 ch\u00fang ta t\u00ecm th\u1ea5y trong Excel. N\u1ebfu b\u1ea1n \u0111\u00e3 t\u1eebng l\u1eadp tr\u00ecnh VBA ho\u1eb7c c\u00e1c ng\u00f4n ng\u1eef kh\u00e1c, ch\u1eafc b\u1ea1n s\u1ebd quen v\u1edbi c\u00e1ch ti\u1ebfp c\u1eadn n\u00e0y. Tuy nhi\u00ean, n\u1ebfu b\u1ea1n ch\u1ec9 ti\u1ebfp c\u1eadn Excel \u1edf m\u1ee9c c\u01a1 b\u1ea3n, \u0111i\u1ec1u n\u00e0y c\u00f3 th\u1ec3 m\u1edbi \u0111\u1ed1i v\u1edbi b\u1ea1n.<\/span><\/p>\n<p><span style=\"font-weight: 400\">B\u1ea1n c\u00f3 hai l\u1ef1a ch\u1ecdn:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">S\u1eed d\u1ee5ng t\u00ednh n\u0103ng c\u1ed9t c\u00f3 \u0111i\u1ec1u ki\u1ec7n cho logic if c\u01a1 b\u1ea3n<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Vi\u1ebft m\u00e3 M \u0111\u1ec3 n\u00e2ng cao h\u01a1n n\u1ebfu logic.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">M\u00ecnh s\u1ebd \u0111\u1ec1 c\u1eadp \u0111\u1ebfn c\u1ea3 hai trong b\u00e0i vi\u1ebft n\u00e0y.<\/span><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_61 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\">Xem nhanh<\/p>\n<p><label for=\"ez-toc-cssicon-toggle-item-674d4b13e58a1\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><\/span><\/span><\/label><\/p>\n<nav>\n<ul class=\"ez-toc-list ez-toc-list-level-1 \">\n<li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/blog.hocexcel.online\/power-query-cau-lenh-if-cho-logic-co-dieu-kien.html#Tai_xuong\" title=\"T\u1ea3i xu\u1ed1ng\">T\u1ea3i xu\u1ed1ng<\/a><\/li>\n<li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/blog.hocexcel.online\/power-query-cau-lenh-if-cho-logic-co-dieu-kien.html#Vi_du\" title=\"V\u00ed d\u1ee5\">V\u00ed d\u1ee5<\/a><\/li>\n<li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/blog.hocexcel.online\/power-query-cau-lenh-if-cho-logic-co-dieu-kien.html#Logic_If_su_dung_cot_dieu_kien\" title=\"Logic If s\u1eed d\u1ee5ng c\u1ed9t \u0111i\u1ec1u ki\u1ec7n\">Logic If s\u1eed d\u1ee5ng c\u1ed9t \u0111i\u1ec1u ki\u1ec7n<\/a>\n<ul class=\"ez-toc-list-level-3\">\n<li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/blog.hocexcel.online\/power-query-cau-lenh-if-cho-logic-co-dieu-kien.html#Tinh_huong_1_%E2%80%93_Phi_bao_hiem_ngay_Chu_Nhat\" title=\"T\u00ecnh hu\u1ed1ng 1 \u2013 Ph\u00ed b\u1ea3o hi\u1ec3m ng\u00e0y Ch\u1ee7 Nh\u1eadt\">T\u00ecnh hu\u1ed1ng 1 \u2013 Ph\u00ed b\u1ea3o hi\u1ec3m ng\u00e0y Ch\u1ee7 Nh\u1eadt<\/a><\/li>\n<li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/blog.hocexcel.online\/power-query-cau-lenh-if-cho-logic-co-dieu-kien.html#Tinh_huong_2_%E2%80%93_Phi_bao_hiem_ngay_Chu_Nhat_va_giam_gia_san_pham\" title=\"T\u00ecnh hu\u1ed1ng 2 \u2013 Ph\u00ed b\u1ea3o hi\u1ec3m ng\u00e0y Ch\u1ee7 Nh\u1eadt v\u00e0 gi\u1ea3m gi\u00e1 s\u1ea3n ph\u1ea9m\">T\u00ecnh hu\u1ed1ng 2 \u2013 Ph\u00ed b\u1ea3o hi\u1ec3m ng\u00e0y Ch\u1ee7 Nh\u1eadt v\u00e0 gi\u1ea3m gi\u00e1 s\u1ea3n ph\u1ea9m<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/blog.hocexcel.online\/power-query-cau-lenh-if-cho-logic-co-dieu-kien.html#Logic_IF_Power_Query_bang_cach_viet_ma_M\" title=\"Logic IF Power Query b\u1eb1ng c\u00e1ch vi\u1ebft m\u00e3 M\">Logic IF Power Query b\u1eb1ng c\u00e1ch vi\u1ebft m\u00e3 M<\/a>\n<ul class=\"ez-toc-list-level-3\">\n<li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/blog.hocexcel.online\/power-query-cau-lenh-if-cho-logic-co-dieu-kien.html#Tinh_huong_1_%E2%80%93_Phi_bao_hiem_Chu_Nhat\" title=\"T\u00ecnh hu\u1ed1ng 1 \u2013 Ph\u00ed b\u1ea3o hi\u1ec3m Ch\u1ee7 Nh\u1eadt\">T\u00ecnh hu\u1ed1ng 1 \u2013 Ph\u00ed b\u1ea3o hi\u1ec3m Ch\u1ee7 Nh\u1eadt<\/a><\/li>\n<li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/blog.hocexcel.online\/power-query-cau-lenh-if-cho-logic-co-dieu-kien.html#Tinh_huong_2_%E2%80%93_Phi_bao_hiem_Chu_Nhat_va_giam_gia_san_pham\" title=\"T\u00ecnh hu\u1ed1ng 2 \u2013 Ph\u00ed b\u1ea3o hi\u1ec3m Ch\u1ee7 Nh\u1eadt v\u00e0 gi\u1ea3m gi\u00e1 s\u1ea3n ph\u1ea9m\">T\u00ecnh hu\u1ed1ng 2 \u2013 Ph\u00ed b\u1ea3o hi\u1ec3m Ch\u1ee7 Nh\u1eadt v\u00e0 gi\u1ea3m gi\u00e1 s\u1ea3n ph\u1ea9m<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/blog.hocexcel.online\/power-query-cau-lenh-if-cho-logic-co-dieu-kien.html#Ket_luan\" title=\"K\u1ebft lu\u1eadn\">K\u1ebft lu\u1eadn<\/a><\/li>\n<\/ul>\n<\/nav>\n<\/div>\n<h2><span class=\"ez-toc-section\" id=\"Tai_xuong\"><\/span><b>T\u1ea3i xu\u1ed1ng<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400\">Nh\u01b0 th\u01b0\u1eddng l\u1ec7 \u0111\u1ec3 c\u00f3 t\u00e0i li\u1ec7u cho ti\u1ebft h\u1ecdc n\u00e0y b\u1ea1n h\u00e3y xem l\u1ea1i b\u00e0i vi\u1ebft c\u1ee7a m\u00ecnh v\u1ec1<a href=\"http:\/\/blog.ezworkapp.com\/power-query-la-gi-tai-sao-can-hoc-power-query.html\"><strong> Power Query<\/strong><\/a>. Th\u00eam v\u00e0o \u0111\u00f3 l\u00e0 \u0111\u1ec3 ti\u1ebfp c\u1eadn c\u00e1c v\u00ed d\u1ee5 b\u00ean d\u01b0\u1edbi, b\u1ea1n h\u00e3y t\u1ea3i xu\u1ed1ng c\u00e1c t\u1ec7p m\u1eabu nh\u00e9. <strong><a href=\"https:\/\/drive.google.com\/file\/d\/1LkCuZ2XkFnOSKgtqYR4y3VllpSn1XSlf\/view\">Nh\u1ea5p v\u00e0o \u0111\u00e2y<\/a><\/strong> \u0111\u1ec3 \u0111\u0103ng k\u00fd v\u00e0 c\u00f3 quy\u1ec1n truy c\u1eadp v\u00e0o ph\u1ea7n T\u1ea3i xu\u1ed1ng.<\/span><\/p>\n<p><span style=\"font-weight: 400\">C\u00e1c v\u00ed d\u1ee5 trong b\u00e0i n\u00e0y s\u1eed d\u1ee5ng t\u1ec7p c\u00f3 t\u00ean <\/span><b>Example 15 \u2013 If Function.xlsx<\/b><\/p>\n<div class=\"code-block code-block-1\" style=\"margin: 8px 0;clear: both\">\n<div class=\"ad-inserterpro\">\n<a href=\"https:\/\/hocexcel.online\/course\/preview\/ex101-excel-tu-co-ban-den-chuyen-gia-danh-cho-nguoi-di-lam\"><br \/>\n<img decoding=\"async\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2024\/12\/ex101_92019-nho-123.gif\" title=\"ex101_92019-nho-123\"><br \/>\n<\/a>\n<\/div>\n<\/div>\n<h2><span class=\"ez-toc-section\" id=\"Vi_du\"><\/span><b>V\u00ed d\u1ee5<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400\">T\u1ec7p ch\u1ec9 ch\u1ee9a m\u1ed9t B\u1ea3ng. Ch\u1ecdn b\u1ea5t k\u1ef3 \u00f4 n\u00e0o trong B\u1ea3ng \u0111\u00f3 v\u00e0 nh\u1ea5p v\u00e0o <\/span><b>Data -&gt; From Table\/Range<\/b><span style=\"font-weight: 400\">\u00a0 \u0111\u1ec3 t\u1ea3i d\u1eef li\u1ec7u v\u00e0o Power Query.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Trong v\u00ed d\u1ee5 n\u00e0y, ch\u00fang ta s\u1ebd t\u00ednh to\u00e1n gi\u00e1 tr\u1ecb gi\u1ea3 s\u1eed nh\u01b0 sau:<\/span><\/p>\n<p><span style=\"font-weight: 400\">T\u00ecnh hu\u1ed1ng 1: V\u00e0o ch\u1ee7 nh\u1eadt c\u00f3 th\u00eam 10% ph\u00ed b\u1ea3o hi\u1ec3m (y\u00eau c\u1ea7u logic c\u01a1 b\u1ea3n)<\/span><\/p>\n<p><span style=\"font-weight: 400\">T\u00ecnh hu\u1ed1ng 2: V\u00e0o ch\u1ee7 nh\u1eadt c\u00f3 th\u00eam 10% ph\u00ed b\u1ea3o hi\u1ec3m, v\u1edbi hai s\u1ea3n ph\u1ea9m (Tiger &amp; Farmhouse Bloomer) c\u0169ng \u0111\u01b0\u1ee3c gi\u1ea3m gi\u00e1 5% v\u00e0o ng\u00e0y h\u00f4m \u0111\u00f3 (y\u00eau c\u1ea7u logic n\u00e2ng cao).<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Logic_If_su_dung_cot_dieu_kien\"><\/span><b>Logic If s\u1eed d\u1ee5ng c\u1ed9t \u0111i\u1ec1u ki\u1ec7n<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400\">H\u00e3y b\u1eaft \u0111\u1ea7u v\u1edbi T\u00ecnh hu\u1ed1ng 1 v\u00e0 s\u1eed d\u1ee5ng t\u00ednh n\u0103ng Conditional Column (C\u1ed9t c\u00f3 \u0111i\u1ec1u ki\u1ec7n)<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Tinh_huong_1_%E2%80%93_Phi_bao_hiem_ngay_Chu_Nhat\"><\/span><b>T\u00ecnh hu\u1ed1ng 1 \u2013 Ph\u00ed b\u1ea3o hi\u1ec3m ng\u00e0y Ch\u1ee7 Nh\u1eadt<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400\">Ch\u1ecdn c\u1ed9t Date, sau \u0111\u00f3 th\u00eam c\u1ed9t ch\u1ee9a ng\u00e0y trong tu\u1ea7n b\u1eb1ng c\u00e1ch nh\u1ea5p v\u00e0o <\/span><b>Add Column -&gt; Date -&gt; Day -&gt; Day Name<\/b><span style=\"font-weight: 400\">.<\/span><\/p>\n<figure id=\"attachment_34592\" aria-describedby=\"caption-attachment-34592\" style=\"width: 525px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-34592 size-full\" title=\"1- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2024\/12\/h1-4.png\" alt=\"1- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n\" width=\"525\" height=\"132\"><figcaption id=\"caption-attachment-34592\" class=\"wp-caption-text\">1- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400\">Ti\u1ebfp theo, nh\u1ea5p v\u00e0o <\/span><b>Add Column -&gt; Conditional Column<\/b><\/p>\n<p><span style=\"font-weight: 400\">Nh\u1eadp c\u00e1c t\u00f9y ch\u1ecdn sau v\u00e0o h\u1ed9p tho\u1ea1i Add Conditional Column:<\/span><\/p>\n<p><span style=\"font-weight: 400\">T\u00ean c\u1ed9t m\u1edbi: <\/span><b>Sunday Premium<\/b><\/p>\n<figure id=\"attachment_34593\" aria-describedby=\"caption-attachment-34593\" style=\"width: 900px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-34593 size-full\" title=\"2- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2024\/12\/h2-3.png\" alt=\"2- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n\" width=\"900\" height=\"441\"><figcaption id=\"caption-attachment-34593\" class=\"wp-caption-text\">2- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400\">N\u1ebfu <\/span><b>Day Name<\/b><span style=\"font-weight: 400\"> b\u1eb1ng Sunday th\u00ec 1.1 kh\u00e1c 1<\/span><\/p>\n<p><span style=\"font-weight: 400\">B\u1ea5m OK \u0111\u1ec3 ch\u1ea5p nh\u1eadn c\u00f4ng th\u1ee9c.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Trong tr\u01b0\u1eddng h\u1ee3p tr\u00ean, ch\u00fang ta ch\u1ec9 s\u1eed d\u1ee5ng m\u1ed9t s\u1ed1 t\u00f9y ch\u1ecdn c\u00f3 s\u1eb5n trong h\u1ed9p tho\u1ea1i Conditional Column.<\/span><\/p>\n<p><span style=\"font-weight: 400\">C\u00e1c t\u00f9y ch\u1ecdn c\u00f3 s\u1eb5n kh\u00e1c:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Equals: B\u1eb1ng<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Does not equal: kh\u00f4ng b\u1eb1ng<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Begins with: B\u1eaft \u0111\u1ea7u v\u1edbi<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Does not begin with: kh\u00f4ng b\u1eaft \u0111\u1ea7u v\u1edbi<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Ends with: K\u1ebft th\u00fac v\u1edbi<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Does not end with: Kh\u00f4ng k\u1ebft th\u00fac v\u1edbi<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Contains: Ch\u1ee9a \u0111\u1ef1ng<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Does not contain: Kh\u00f4ng ch\u1ee9a<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Trong h\u1ed9p tho\u1ea1i Add Conditional Column, ch\u00fang ta c\u00f3 th\u1ec3 nh\u1ea5p v\u00e0o n\u00fat 123ABC \u0111\u1ec3 ch\u00e8n gi\u00e1 tr\u1ecb c\u1ed9t ho\u1eb7c tham s\u1ed1 thay v\u00ec gi\u00e1 tr\u1ecb m\u00e3 c\u1ee9ng.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Ngo\u00e0i ra, ch\u00fang ta c\u00f3 th\u1ec3 t\u1ea1o bao nhi\u00eau c\u00e2u l\u1ec7nh IF t\u00f9y th\u00edch b\u1eb1ng c\u00e1ch nh\u1ea5p v\u00e0o n\u00fat <\/span><b>Add rule<\/b><span style=\"font-weight: 400\">. C\u00e1c c\u00e2u l\u1ec7nh IF s\u1ebd \u0111\u01b0\u1ee3c th\u1ef1c hi\u1ec7n l\u1ea7n l\u01b0\u1ee3t, ngh\u0129a l\u00e0, khi c\u00e2u l\u1ec7nh if \u0111\u1ea7u ti\u00ean kh\u00f4ng \u0111\u01b0\u1ee3c k\u00edch ho\u1ea1t, n\u00f3 s\u1ebd chuy\u1ec3n sang c\u00e2u l\u1ec7nh th\u1ee9 hai, r\u1ed3i \u0111\u1ebfn c\u00e2u l\u1ec7nh th\u1ee9 ba, v.v. Tuy nhi\u00ean, n\u1ebfu c\u00e2u l\u1ec7nh if \u0111\u1ea7u ti\u00ean l\u00e0 \u0111\u00fang, logic c\u00f2n l\u1ea1i s\u1ebd b\u1ecb b\u1ecf qua.<\/span><\/p>\n<figure id=\"attachment_34595\" aria-describedby=\"caption-attachment-34595\" style=\"width: 525px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-34595 size-full\" title=\"3- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2024\/12\/h3-3.png\" alt=\"3- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n\" width=\"525\" height=\"132\"><figcaption id=\"caption-attachment-34595\" class=\"wp-caption-text\">3- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400\">Cu\u1ed1i c\u00f9ng, h\u00e3y th\u00eam m\u1ed9t c\u00f4ng th\u1ee9c. B\u1ea5m <\/span><b>Add Column -&gt; Custom Column<\/b><span style=\"font-weight: 400\">\u00a0 \u0111\u1ec3 hi\u1ec3n th\u1ecb h\u1ed9p tho\u1ea1i Custom Column.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Sau \u0111\u00f3 nh\u1eadp c\u00f4ng th\u1ee9c sau:<\/span><\/p>\n<p><span style=\"font-weight: 400\">=[Value] * [Sunday Premium]<\/span><\/p>\n<p><span style=\"font-weight: 400\">Ch\u1ecdn c\u00f4ng th\u1ee9c Adjusted Value, sau \u0111\u00f3 b\u1ea5m OK.<\/span><\/p>\n<figure id=\"attachment_34596\" aria-describedby=\"caption-attachment-34596\" style=\"width: 789px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-34596 size-full\" title=\"4- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2024\/12\/h4-4.png\" alt=\"4- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n\" width=\"789\" height=\"495\"><figcaption id=\"caption-attachment-34596\" class=\"wp-caption-text\">4- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400\">Ngo\u00e0i ra, \u0111\u1ed1i v\u1edbi giai \u0111o\u1ea1n cu\u1ed1i c\u00f9ng n\u00e0y, b\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng m\u1ed9t c\u1ed9t nh\u00e2n b\u1eb1ng c\u00e1ch <\/span><b>Add Column -&gt; Standard -&gt; Multiply<\/b><span style=\"font-weight: 400\">, nh\u01b0ng m\u00ecnh th\u00edch c\u00e1ch ti\u1ebfp c\u1eadn Custom Column h\u01a1n.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Ch\u1eafn h\u1eb3n b\u1ea1n \u0111\u00e3 c\u1ea3m th\u1ea5y logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n l\u00e0 kh\u00e1 d\u1ec5 d\u00e0ng\u2026 \u0111\u00fang kh\u00f4ng?<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Tinh_huong_2_%E2%80%93_Phi_bao_hiem_ngay_Chu_Nhat_va_giam_gia_san_pham\"><\/span><b>T\u00ecnh hu\u1ed1ng 2 \u2013 Ph\u00ed b\u1ea3o hi\u1ec3m ng\u00e0y Ch\u1ee7 Nh\u1eadt v\u00e0 gi\u1ea3m gi\u00e1 s\u1ea3n ph\u1ea9m<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400\">N\u1ebfu b\u1ea1n \u0111ang c\u1ed1 g\u1eafng s\u1eed d\u1ee5ng C\u1ed9t c\u00f3 \u0111i\u1ec1u ki\u1ec7n v\u1edbi hai \u0111i\u1ec1u ki\u1ec7n tr\u1edf l\u00ean, m\u1ecdi th\u1ee9 s\u1ebd tr\u1edf n\u00ean r\u1ea5t ph\u1ee9c t\u1ea1p, n\u1ebfu kh\u00f4ng mu\u1ed1n n\u00f3i l\u00e0 r\u1ea5t kh\u00f3.<\/span><\/p>\n<p><span style=\"font-weight: 400\">M\u00ecnh \u0111\u00e3 xem qua m\u1ed9t danh s\u00e1ch d\u00e0i c\u00e1c chuy\u1ec3n \u0111\u1ed5i \u0111\u1ec3 minh h\u1ecda c\u00e1ch l\u00e0m\u00a0 v\u1edbi t\u00ecnh hu\u1ed1ng 2, nh\u01b0ng m\u00ecnh s\u1ebd kh\u00f4ng l\u00e0m nh\u01b0 v\u1eady .. T\u00ednh n\u0103ng C\u1ed9t c\u00f3 \u0111i\u1ec1u ki\u1ec7n th\u1ef1c s\u1ef1 d\u00e0nh cho c\u00e1c y\u00eau c\u1ea7u c\u01a1 b\u1ea3n; n\u00f3 kh\u00f4ng cho ph\u00e9p ch\u00fang ta s\u1eed d\u1ee5ng logic AND ho\u1eb7c OR.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Thay v\u00e0o \u0111\u00f3, ch\u00fang ta s\u1ebd chuy\u1ec3n sang t\u00f9y ch\u1ecdn 2, \u0111\u00f3 l\u00e0 t\u1ef1 vi\u1ebft m\u00e3 Power Query M. \u0110\u1eebng lo l\u1eafng, m\u00ecnh tin t\u01b0\u1edfng v\u00e0o b\u1ea1n. B\u1ea1n ch\u1eafc ch\u1eafn l\u00e0m \u0111\u01b0\u1ee3c \u0111i\u1ec1u n\u00e0y \ud83d\ude42<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Logic_IF_Power_Query_bang_cach_viet_ma_M\"><\/span><b>Logic IF Power Query b\u1eb1ng c\u00e1ch vi\u1ebft m\u00e3 M<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400\">Tr\u01b0\u1edbc khi b\u1eaft \u0111\u1ea7u v\u1edbi c\u00e1c v\u00ed d\u1ee5, h\u00e3y d\u00e0nh v\u00e0i ph\u00fat \u0111\u1ec3 hi\u1ec3u c\u00e1ch ho\u1ea1t \u0111\u1ed9ng c\u1ee7a Power Query<\/span><\/p>\n<p><span style=\"font-weight: 400\">Trong Excel, h\u00e0m IF s\u1ebd \u0111\u01b0\u1ee3c vi\u1ebft d\u01b0\u1edbi d\u1ea1ng:<\/span><\/p>\n<p><span style=\"font-weight: 400\">=IF( [thing] = \u201cthing 2\u201d, [do this if true] , [do this if false] )<\/span><\/p>\n<p><span style=\"font-weight: 400\">V\u00ec v\u1eady b\u1ea1n c\u00f3 th\u1ec3 d\u1ec5 d\u00e0ng h\u01a1n khi ngh\u0129 v\u1ec1 n\u00f3 nh\u01b0 th\u1ebf n\u00e0y:<\/span><\/p>\n<p><span style=\"font-weight: 400\">b\u1ecf d\u1ea5u ngo\u1eb7c m\u1edf v\u00e0 \u0111\u00f3ng<\/span><\/p>\n<p><span style=\"font-weight: 400\">thay \u0111\u1ed5i d\u1ea5u ph\u1ea9y \u0111\u1ea7u ti\u00ean b\u1eb1ng <\/span><b>then<\/b><\/p>\n<p><span style=\"font-weight: 400\">thay \u0111\u1ed5i d\u1ea5u ph\u1ea9y cu\u1ed1i c\u00f9ng b\u1eb1ng <\/span><b>else<\/b><\/p>\n<p><span style=\"font-weight: 400\">thay \u0111\u1ed5i IF cho <\/span><b>if<\/b><\/p>\n<p><span style=\"font-weight: 400\">\u0110i\u1ec1u n\u00e0y s\u1ebd t\u1ea1o ra m\u00e3 M sau \u0111\u00e2y<\/span><\/p>\n<p><span style=\"font-weight: 400\">= if [thing] = \u201cthing 2\u201d then [do this if true] else [do this if false]<\/span><\/p>\n<p><span style=\"font-weight: 400\">B\u1ea1n c\u1ee9 l\u00e0m v\u00e0i l\u1ea7n th\u00ec s\u1ebd nh\u1edb. N\u00f3 c\u00f3 m\u1ed9t l\u1ee3i th\u1ebf n\u1eefa l\u00e0 n\u00f3 nghe gi\u1ed1ng nh\u01b0 m\u1ed9t c\u00e2u ti\u1ebfng Anh ti\u00eau chu\u1ea9n, l\u00e0m cho n\u00f3 d\u1ec5 hi\u1ec3u h\u01a1n nhi\u1ec1u so v\u1edbi Excel.<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u0110\u1ec3 l\u1ed3ng m\u1ed9t if trong m\u1ed9t if kh\u00e1c n\u1ebfu ch\u00fang ta s\u1eed d\u1ee5ng c\u00f9ng m\u1ed9t ph\u01b0\u01a1ng ph\u00e1p if \u2013 then \u2013 else, nh\u01b0 \u0111\u01b0\u1ee3c hi\u1ec3n th\u1ecb b\u00ean d\u01b0\u1edbi<\/span><\/p>\n<p><span style=\"font-weight: 400\">= if [thing to to test #1]\u00a0 = \u201csomething else\u201d then [do this if true]<\/span><\/p>\n<p><span style=\"font-weight: 400\">else if [thing to to test #2]\u00a0 = \u201csomething else\u201d then [do this if true] else\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">[do this if false]<\/span><\/p>\n<p><span style=\"font-weight: 400\">C\u00f3 th\u1ec3 c\u00f3 nhi\u1ec1u if l\u1ed3ng nha. \u0110i\u1ec1u n\u00e0y ho\u1ea1t \u0111\u1ed9ng theo c\u00e1ch t\u01b0\u01a1ng t\u1ef1 nh\u01b0 vi\u1ec7c th\u00eam c\u00e1c quy t\u1eafc m\u1edbi v\u00e0o C\u1ed9t c\u00f3 \u0111i\u1ec1u ki\u1ec7n.<\/span><\/p>\n<p><span style=\"font-weight: 400\">S\u1eed d\u1ee5ng logic AND ho\u1eb7c OR c\u0169ng kh\u00e1 \u0111\u01a1n gi\u1ea3n, ch\u00fang ta ch\u1ec9 s\u1eed d\u1ee5ng c\u00e1c t\u1eeb <\/span><b>and<\/b><span style=\"font-weight: 400\"> ho\u1eb7c <\/span><b>or <\/b><span style=\"font-weight: 400\">trong m\u00e3. \u0110o\u1ea1n m\u00e3 d\u01b0\u1edbi \u0111\u00e2y v\u00ed d\u1ee5 s\u1eed d\u1ee5ng logic <\/span><b>and<\/b><span style=\"font-weight: 400\">.<\/span><\/p>\n<p><span style=\"font-weight: 400\">= if [thing to to test #1]\u00a0 = \u201csomething else\u201d\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">and [thing to to test #2]\u00a0 = \u201csomething else #2\u201d\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">then [do this if true] else [do this if false]<\/span><\/p>\n<p><span style=\"font-weight: 400\">Khi c\u00f3 s\u1ef1 k\u1ebft h\u1ee3p c\u1ee7a c\u1ea3 logic <\/span><b>and<\/b><span style=\"font-weight: 400\"> v\u00e0 logic <\/span><b>or<\/b><span style=\"font-weight: 400\">, c\u1ea7n c\u00f3 d\u1ea5u ngo\u1eb7c \u0111\u1ec3 \u0111\u1ea3m b\u1ea3o logic \u0111\u00e1nh gi\u00e1 theo \u0111\u00fang th\u1ee9 t\u1ef1.<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u0110\u00f3 l\u00e0 nh\u1eefng \u0111i\u1ec1u c\u01a1 b\u1ea3n v\u1ec1 if trong Power Query, c\u00f2n b\u00e2y gi\u1edd l\u00e0 l\u00fac d\u00e0nh cho c\u00e1c v\u00ed d\u1ee5.<\/span><\/p>\n<p><span style=\"font-weight: 400\">B\u1eaft \u0111\u1ea7u l\u1ea1i t\u1eeb \u0111\u1ea7u b\u1eb1ng c\u00e1ch t\u1ea3i l\u1ea1i B\u1ea3ng v\u00e0o Power Query. Sau \u0111\u00f3, th\u00eam c\u1ed9t t\u00ean Week Day nh\u01b0 ch\u00fang ta \u0111\u00e3 l\u00e0m trong v\u00ed d\u1ee5 tr\u00ean.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Tinh_huong_1_%E2%80%93_Phi_bao_hiem_Chu_Nhat\"><\/span><b>T\u00ecnh hu\u1ed1ng 1 \u2013 Ph\u00ed b\u1ea3o hi\u1ec3m Ch\u1ee7 Nh\u1eadt<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<figure id=\"attachment_34597\" aria-describedby=\"caption-attachment-34597\" style=\"width: 525px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-34597 size-full\" title=\"5- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2024\/12\/h5-4.png\" alt=\"5- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n\" width=\"525\" height=\"132\"><figcaption id=\"caption-attachment-34597\" class=\"wp-caption-text\">5- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400\">Th\u00eam m\u1ed9t c\u1ed9t t\u00f9y ch\u1ec9nh v\u00e0o b\u1ea3ng b\u1eb1ng c\u00e1ch nh\u1ea5p v\u00e0o <\/span><b>\u00a0Add Column\u00a0 -&gt; Custom Column<\/b><\/p>\n<p><span style=\"font-weight: 400\">S\u1eed d\u1ee5ng c\u00f4ng th\u1ee9c sau:<\/span><\/p>\n<figure id=\"attachment_34598\" aria-describedby=\"caption-attachment-34598\" style=\"width: 789px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-34598 size-full\" title=\"6- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2024\/12\/h6-4.png\" alt=\"6- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n\" width=\"789\" height=\"475\"><figcaption id=\"caption-attachment-34598\" class=\"wp-caption-text\">6- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400\">= if [Day Name] = \u201cSunday\u201d then [Value] * 1.1 else [Value]<\/span><\/p>\n<p><span style=\"font-weight: 400\">H\u00e3y ch\u00fa \u00fd \u0111\u1ebfn c\u00e1c t\u1eeb<\/span><b> if, then<\/b><span style=\"font-weight: 400\"> v\u00e0 <\/span><b>else<\/b><span style=\"font-weight: 400\">, ch\u00fang \u0111\u1ec1u l\u00e0 ch\u1eef th\u01b0\u1eddng. Power Query c\u00f3 ph\u00e2n bi\u1ec7t ch\u1eef hoa ch\u1eef th\u01b0\u1eddng, v\u00ec v\u1eady n\u1ebfu ch\u00fang ta m\u1eafc l\u1ed7i n\u00e0y, c\u00f4ng th\u1ee9c s\u1ebd kh\u00f4ng ho\u1ea1t \u0111\u1ed9ng.<\/span><\/p>\n<p><span style=\"font-weight: 400\">B\u1ea5m OK \u0111\u1ec3 th\u00eam c\u00f4ng th\u1ee9c.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Tinh_huong_2_%E2%80%93_Phi_bao_hiem_Chu_Nhat_va_giam_gia_san_pham\"><\/span><b>T\u00ecnh hu\u1ed1ng 2 \u2013 Ph\u00ed b\u1ea3o hi\u1ec3m Ch\u1ee7 Nh\u1eadt v\u00e0 gi\u1ea3m gi\u00e1 s\u1ea3n ph\u1ea9m<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400\">C\u00f3 m\u1ed9t s\u1ed1 c\u00e1ch \u0111\u1ec3 vi\u1ebft c\u00f4ng th\u1ee9c n\u00e0y. D\u1ef1a tr\u00ean t\u1eadp d\u1eef li\u1ec7u c\u1ee7a ch\u00fang ta, c\u00f3 ba k\u1ebft qu\u1ea3 c\u00f3 th\u1ec3 x\u1ea3y ra cho t\u00ecnh hu\u1ed1ng n\u00e0y:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Gi\u1ea3m gi\u00e1 s\u1ea3n ph\u1ea9m &amp; ph\u00ed b\u1ea3o hi\u1ec3m Ch\u1ee7 nh\u1eadt<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Chi ph\u00ed b\u1ea3o hi\u1ec3m ch\u1ee7 nh\u1eadt<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Kh\u00f4ng c\u00f3 ph\u00ed b\u1ea3o hi\u1ec3m hay gi\u1ea3m gi\u00e1<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Gi\u1ea3i ph\u00e1p s\u1ed1 1:<\/span><\/p>\n<p><span style=\"font-weight: 400\">= if [Day Name] = \u201cSunday\u201d and ([Product] = \u201cTiger\u201d or [Product] = \u201cFarmhouse Bloomer\u201d) then\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">[Value] * 1.1 * 0.95<\/span><\/p>\n<p><span style=\"font-weight: 400\">else if [Day Name] = \u201cSunday\u201d\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">then [Value] * 1.1<\/span><\/p>\n<p><span style=\"font-weight: 400\">else [Value]<\/span><\/p>\n<figure id=\"attachment_34599\" aria-describedby=\"caption-attachment-34599\" style=\"width: 512px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-34599 size-full\" title=\"7- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2024\/12\/h7-4.png\" alt=\"7- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n\" width=\"512\" height=\"304\"><figcaption id=\"caption-attachment-34599\" class=\"wp-caption-text\">7- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400\">Ch\u00fang ta c\u1ea7n th\u00eam m\u1ed9t s\u1ed1 d\u1ea5u ngo\u1eb7c v\u00e0o \u0111\u00e2y \u0111\u1ec3 \u0111\u1ea3m b\u1ea3o c\u00f4ng th\u1ee9c th\u1ef1c thi theo \u0111\u00fang th\u1ee9 t\u1ef1. Ch\u00fang ta mu\u1ed1n ph\u1ea7n t\u1eed <\/span><b>or<\/b><span style=\"font-weight: 400\"> \u0111\u01b0\u1ee3c t\u00ednh to\u00e1n tr\u01b0\u1edbc, v\u00ec v\u1eady ch\u00fang ta \u0111\u1eb7t ph\u1ea7n n\u00e0y trong ngo\u1eb7c.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Gi\u1ea3i ph\u00e1p # 2:<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u0110\u00e2y l\u00e0 m\u1ed9t gi\u1ea3i ph\u00e1p kh\u00e1c m\u00e0 b\u1ea1n c\u00f3 th\u1ec3 th\u1eed.<\/span><\/p>\n<p><span style=\"font-weight: 400\">= if [Day Name] = \u201cSunday\u201d then\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">if [Product] = \u201cTiger\u201d or [Product] = \u201cFarmhouse Bloomer\u201d then [Value] * 1.1 * 0.95<\/span><\/p>\n<p><span style=\"font-weight: 400\">else [Value] * 1.1\u00a0<\/span><\/p>\n<figure id=\"attachment_34600\" aria-describedby=\"caption-attachment-34600\" style=\"width: 792px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-34600 size-full\" title=\"8- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2024\/12\/h8-4.png\" alt=\"8- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n\" width=\"792\" height=\"482\"><figcaption id=\"caption-attachment-34600\" class=\"wp-caption-text\">8- C\u00e2u l\u1ec7nh If Power Query cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n<\/figcaption><\/figure>\n<p><span style=\"font-weight: 400\">else [Value]<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Ket_luan\"><\/span><b>K\u1ebft lu\u1eadn<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400\">Logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n s\u1eed d\u1ee5ng <strong>c\u00e2u l\u1ec7nh if trong Power Query<\/strong> kh\u00e1c v\u1edbi Excel. Tuy nhi\u00ean, n\u00f3 kh\u00f4ng kh\u00f3 hi\u1ec3u, ch\u1ec9 c\u1ea7n b\u1ea1n th\u1ef1c h\u00e0nh v\u00e0i l\u1ea7n l\u00e0 s\u1ebd th\u00e0nh th\u1ea1o ngay. M\u00ecnh tin b\u1ea1n!\u00a0<\/span><\/p>\n<\/div>\n<div class=\"uk-panel uk-margin uk-width-xlarge\">\n<p>Click \u0111\u0103ng k\u00fd h\u1ecdc t\u1ea1i:<\/p>\n<p><a href=\"http:\/\/blog.ezworkapp.com\/khoa-hoc\" target=\"_blank\" rel=\"noopener\">T\u1ea5t c\u1ea3 kho\u00e1 h\u1ecdc\u00a0<span>\ud83d\udcd6<\/span><\/a><\/p>\n<p><a href=\"http:\/\/blog.ezworkapp.com\/huong-dan-kich-hoat-khoa-hoc-tai-hoc-excel-online.html\" target=\"_blank\" rel=\"noopener\">H\u01b0\u1edbng d\u1eabn k\u00edch ho\u1ea1t<\/a><\/p>\n<p>HKD H\u1ecdc Excel Online<br \/>S\u1ed1 \u0110K: 17A80048102<\/p>\n<\/div>\n<div class=\"uk-panel uk-text-small uk-margin uk-margin-remove-bottom uk-text-center\">\n<p>\u00a9  document.currentScript.insertAdjacentHTML(&#8216;afterend&#8217;, &#8221; + new Intl.DateTimeFormat(document.documentElement.lang, {year: &#8216;numeric&#8217;}).format() + &#8221;);  H\u1ecdc Excel Online. All rights reserved.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<div class=\"ad-inserterpro\">\n<a href=\"https:\/\/hocexcel.online\/course\/preview\/ex101-excel-tu-co-ban-den-chuyen-gia-danh-cho-nguoi-di-lam\"><br \/>\n<img decoding=\"async\" src=\"http:\/\/blog.ezworkapp.com\/wp-content\/uploads\/2024\/12\/ex101_92019-nho-123.gif\"><br \/>\n<\/a>\n<\/div>\n","protected":false},"author":1,"featured_media":1694,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1693","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-excel-nang-cao"],"_links":{"self":[{"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/posts\/1693","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/comments?post=1693"}],"version-history":[{"count":0,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/posts\/1693\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/media\/1694"}],"wp:attachment":[{"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/media?parent=1693"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/categories?post=1693"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ezworkapp.com\/index.php\/wp-json\/wp\/v2\/tags?post=1693"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}