<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: POWER BI DAX CONDITIONAL CALCULATION ISSUE in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3637508#M140751</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="563434" data-lia-user-login="Shineccx007" class="lia-mention lia-mention-user"&gt;Shineccx007&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Have you created the relationships between the tables, pleas share a screenshot of it. In which table you want the new calucalted column to calculate the Safty Stock?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 14 Jan 2024 07:28:06 GMT</pubDate>
    <dc:creator>Fowmy</dc:creator>
    <dc:date>2024-01-14T07:28:06Z</dc:date>
    <item>
      <title>POWER BI DAX CONDITIONAL CALCULATION ISSUE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3637470#M140747</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am quite confusing why my DAX cannot recognize some columns when I have the conditional calculation formula among four three tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table "ItemCard" include column [Item No] from 1 to 30, column [Category] include "Set" and "CAL",column [Lead time] as numbers,&lt;BR /&gt;Table "ItemLedgerEntries" include column [Item No] from 1 to 30, column [qty], measure [avgDailyConsumptionQty]&lt;/P&gt;&lt;P&gt;Table "SetToOrder" include column [Item No] from1 to 10, column [SafetyStockQty], column [Category] all is "Set",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I want to write the DAX to enable me know all the item Safety Stock Qty so I can know when shall I place new order for the items.&lt;BR /&gt;&lt;BR /&gt;Logic:&lt;BR /&gt;SafetyQty =&amp;nbsp;&lt;BR /&gt;IF(ItemCard[Category]="Set",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; SetToOrder[SafetyStockQty],&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ItemCard[LeadTime]*ItemLedgerEntries[AvgDailyConsumptionQty]*1.8))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know why for some reason, the system prompt my DAX logic is wrong. Power BI desktop cannot execujte this DAX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone offer some suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 05:17:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3637470#M140747</guid>
      <dc:creator>Shineccx007</dc:creator>
      <dc:date>2024-01-14T05:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: POWER BI DAX CONDITIONAL CALCULATION ISSUE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3637508#M140751</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="563434" data-lia-user-login="Shineccx007" class="lia-mention lia-mention-user"&gt;Shineccx007&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Have you created the relationships between the tables, pleas share a screenshot of it. In which table you want the new calucalted column to calculate the Safty Stock?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 07:28:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3637508#M140751</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2024-01-14T07:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: POWER BI DAX CONDITIONAL CALCULATION ISSUE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3637613#M140761</link>
      <description>&lt;P&gt;Hi Fowmy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Relationship among these tables:&lt;/P&gt;&lt;P&gt;The key is item No&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ItemCard is linked by [item no] to ItemLedgerEntries, one to many&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ItemCard is linked by [item no] to SetToOrder, one to one&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I wanted to add the calculated column under ItemCard table on the SafetyStock Calculation&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 14:21:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3637613#M140761</guid>
      <dc:creator>Shineccx007</dc:creator>
      <dc:date>2024-01-14T14:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: POWER BI DAX CONDITIONAL CALCULATION ISSUE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3637620#M140762</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="563434" data-lia-user-login="Shineccx007" class="lia-mention lia-mention-user"&gt;Shineccx007&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am not sure the following will work as I need to know how your measure&amp;nbsp;[AvgDailyConsumptionQty]&amp;nbsp; &amp;nbsp;is calculated.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Please try:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SafetyQty =
IF (
    ItemCard[Category] = "Set",
    RELATED ( SetToOrder[SafetyStockQty] ),
    ItemCard[LeadTime] * [AvgDailyConsumptionQty] * 1.8
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 14:35:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3637620#M140762</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2024-01-14T14:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: POWER BI DAX CONDITIONAL CALCULATION ISSUE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3637639#M140763</link>
      <description>&lt;P&gt;Hi Fowemy&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It showed "Expressions that yield variant data-type cannot be used to define calculated columns."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Avg Daily consumption column under table ItemLedgerEntries is calculated by summarize recent 3 month consumption quantity and divide by 20.&lt;BR /&gt;&lt;BR /&gt;I have a seperate date table "dim_date", it's a calendar from min.ItemLedgerEntries[PostingDate] till today, linked by date to ItemLedgerEntries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Model as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 15:39:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3637639#M140763</guid>
      <dc:creator>Shineccx007</dc:creator>
      <dc:date>2024-01-14T15:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: POWER BI DAX CONDITIONAL CALCULATION ISSUE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3637737#M140772</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="563434" data-lia-user-login="Shineccx007" class="lia-mention lia-mention-user"&gt;Shineccx007&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Looks like i meed to have a look at your model.&lt;BR /&gt;Sharing a dummy Power BI file representing your scenario would be beneficial. You can save the Power BI file on Google Drive or any other cloud storage platform and provide the link here. Kindly ensure that permission is granted to open the file.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 19:55:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3637737#M140772</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2024-01-14T19:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: POWER BI DAX CONDITIONAL CALCULATION ISSUE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3637784#M140780</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the dataset I modified. Please have a look at it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1V_bO2Zj5eF-zT4CkTa7o1FV3m9pFxcBb/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/1V_bO2Zj5eF-zT4CkTa7o1FV3m9pFxcBb/view?usp=sharing&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 21:12:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3637784#M140780</guid>
      <dc:creator>Shineccx007</dc:creator>
      <dc:date>2024-01-14T21:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: POWER BI DAX CONDITIONAL CALCULATION ISSUE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3637798#M140781</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the link on the file. I modified the dataset a little bit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1baq1qiV36AaJqAQnVIFNA4gsO4yVJP8v/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/1baq1qiV36AaJqAQnVIFNA4gsO4yVJP8v/view?usp=sharing&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 21:24:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3637798#M140781</guid>
      <dc:creator>Shineccx007</dc:creator>
      <dc:date>2024-01-14T21:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: POWER BI DAX CONDITIONAL CALCULATION ISSUE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3637870#M140784</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="80669" data-lia-user-login="VJN" class="lia-mention lia-mention-user"&gt;VJN&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help have a look at it? Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 22:39:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3637870#M140784</guid>
      <dc:creator>Shineccx007</dc:creator>
      <dc:date>2024-01-14T22:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: POWER BI DAX CONDITIONAL CALCULATION ISSUE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3638245#M140811</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="563434" data-lia-user-login="Shineccx007" class="lia-mention lia-mention-user"&gt;Shineccx007&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Please check the attached file and see if this is your requirement.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 06:46:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3638245#M140811</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2024-01-15T06:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: POWER BI DAX CONDITIONAL CALCULATION ISSUE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3639253#M140864</link>
      <description>&lt;P&gt;Thank you Fowny!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My original dataset, under ItemCard, the column [lead time] is missing some data there. I write the dax below, let the system calculate the one with value only. But I have no idea why it kept showing blank in my measurement. Screenshot as below.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 16:35:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3639253#M140864</guid>
      <dc:creator>Shineccx007</dc:creator>
      <dc:date>2024-01-15T16:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: POWER BI DAX CONDITIONAL CALCULATION ISSUE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3639254#M140865</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 16:36:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POWER-BI-DAX-CONDITIONAL-CALCULATION-ISSUE/m-p/3639254#M140865</guid>
      <dc:creator>Shineccx007</dc:creator>
      <dc:date>2024-01-15T16:36:02Z</dc:date>
    </item>
  </channel>
</rss>

