<?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: Re: in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/2975178#M99596</link>
    <description>&lt;P&gt;Update:&lt;BR /&gt;&lt;BR /&gt;Already have the answer but kinda complicated.&lt;BR /&gt;&lt;BR /&gt;the idea is to create multiple var to count the products&lt;BR /&gt;and then return it using floor&lt;BR /&gt;return&lt;BR /&gt;floor(item(1)+item(2)+....+Item(n),n)/n&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 18 Dec 2022 12:35:52 GMT</pubDate>
    <dc:creator>Fxelixe</dc:creator>
    <dc:date>2022-12-18T12:35:52Z</dc:date>
    <item>
      <title>Re:</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/2975138#M99592</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So i have trouble to create logic to solve package issue.&lt;/P&gt;&lt;P&gt;the goal is to put remark when customer buy our package which consist of several products&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if customer didn't buy the specific product then we remark it as 0, if buy all of the specific products then we remark it as 1&lt;BR /&gt;&lt;BR /&gt;Here's my DAX logic&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Package Remark = CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;([Unit Sold]&lt;/SPAN&gt;&lt;SPAN&gt;,[Unit Sold]&amp;gt;=1.0,&lt;/SPAN&gt;&lt;SPAN&gt;filter&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Product'&lt;/SPAN&gt;&lt;SPAN&gt;,[Product Name&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt; &lt;SPAN&gt;IN&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;SPAN&gt;"Product A"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"Product B"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"Product C"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"Product D"}&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;))&lt;BR /&gt;&lt;BR /&gt;Here's some excel visualization for the expected output&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;P&gt;&lt;BR /&gt;Well in excel i could easily do COUNT IF cell value &amp;gt;= 1.5 is equal to 6 then 1 , if false 0. then sum it.&amp;nbsp;&lt;BR /&gt;but i cannot do that easily in power BI. still learning to be better.&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 14 Jan 2023 20:01:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/2975138#M99592</guid>
      <dc:creator>Fxelixe</dc:creator>
      <dc:date>2023-01-14T20:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Re:</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/2975173#M99593</link>
      <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="487555" data-lia-user-login="Fxelixe" class="lia-mention lia-mention-user"&gt;Fxelixe&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IN is OR logic, but it seems you expect a AND logic. Try to modify it firstly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the issue persists, it would be necessary to also provide more info about your data model: tables, columns and relationships. It seems you have at least a Product Table and Fact Table, maybe a Customer Table as well.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2022 12:30:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/2975173#M99593</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2022-12-18T12:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Re:</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/2975174#M99594</link>
      <description>&lt;P&gt;yes I already think to use AND, but AND logic only works for 2 item. I need flexibilities to determine # of products&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2022 12:33:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/2975174#M99594</guid>
      <dc:creator>Fxelixe</dc:creator>
      <dc:date>2022-12-18T12:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Re:</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/2975177#M99595</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure how your datamodel looks like, but please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;It is for creating a measure.&lt;/P&gt;
&lt;P&gt;I hope the below can provide some ideas on how to create a solution for your datamodel.&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;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Expected output: =
VAR _productAcondition =
    CALCULATE ( SUM ( Data[Quantity] ), Package[Product Name] = "Product A" ) &amp;lt;&amp;gt; 0
VAR _productBcondition =
    CALCULATE ( SUM ( Data[Quantity] ), Package[Product Name] = "Product B" ) &amp;lt;&amp;gt; 0
VAR _productCcondition =
    CALCULATE ( SUM ( Data[Quantity] ), Package[Product Name] = "Product C" ) &amp;lt;&amp;gt; 0
VAR _productDcondition =
    CALCULATE ( SUM ( Data[Quantity] ), Package[Product Name] = "Product D" ) &amp;lt;&amp;gt; 0
RETURN
    IF (
        HASONEVALUE ( User[User] ),
        _productAcondition * _productBcondition * _productCcondition * _productDcondition
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2022 12:35:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/2975177#M99595</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-12-18T12:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Re:</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/2975178#M99596</link>
      <description>&lt;P&gt;Update:&lt;BR /&gt;&lt;BR /&gt;Already have the answer but kinda complicated.&lt;BR /&gt;&lt;BR /&gt;the idea is to create multiple var to count the products&lt;BR /&gt;and then return it using floor&lt;BR /&gt;return&lt;BR /&gt;floor(item(1)+item(2)+....+Item(n),n)/n&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2022 12:35:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/2975178#M99596</guid>
      <dc:creator>Fxelixe</dc:creator>
      <dc:date>2022-12-18T12:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Re:</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/2975179#M99597</link>
      <description>&lt;P&gt;you can use &amp;amp;&amp;amp; to combine Boolean expressions as many as possible.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2022 12:36:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/2975179#M99597</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2022-12-18T12:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Re:</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/2975180#M99598</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="487555" data-lia-user-login="Fxelixe" class="lia-mention lia-mention-user"&gt;Fxelixe&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;P&gt;Package Remark =&lt;BR /&gt;VAR Count1 =&lt;BR /&gt;COUNTROWS (&lt;BR /&gt;FILTER (&lt;BR /&gt;VALUES ( 'Product'[Product Name] ),&lt;BR /&gt;'Product'[Product Name]&lt;BR /&gt;IN { "Product A", "Product B", "Product C", "Product D" }&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;IF ( ISINSCOPE ( 'Product'[Product Name] ), Count1, IF ( Count1 = 4, 1 ) )&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2022 12:37:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/2975180#M99598</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-12-18T12:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Re:</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/2975181#M99599</link>
      <description>&lt;P&gt;yes i also think the same idea hahaha. thank you, i hope in the future someone will be helped by this thread&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2022 12:37:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/2975181#M99599</guid>
      <dc:creator>Fxelixe</dc:creator>
      <dc:date>2022-12-18T12:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Re:</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/3020981#M102774</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;your dax works and helps me a lot!, but suddenly the problem got more complex for me:&lt;BR /&gt;&lt;BR /&gt;1.&amp;nbsp; package is valid if each product's sold is &lt;STRONG&gt;&amp;gt;= 1.5&lt;/STRONG&gt;&lt;BR /&gt;2.&amp;nbsp; the result can be cumulative on the last solution it would be&amp;nbsp;&lt;STRONG&gt;total = 2&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&lt;/STRONG&gt;(my hypothesis because if we use IF statement, the calculation will treat them as logical, not cumulative)&lt;BR /&gt;3.&amp;nbsp; each user has one group and the result expected to be summarize by group&lt;BR /&gt;&lt;BR /&gt;Here's the updated table&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;and then if grouped by "Group"&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;thank you so much&lt;/P&gt;</description>
      <pubDate>Sat, 14 Jan 2023 19:57:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/3020981#M102774</guid>
      <dc:creator>Fxelixe</dc:creator>
      <dc:date>2023-01-14T19:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Re:</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/3021264#M102798</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you for your message, and please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;I tried to create a sample pbix file like 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;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jan 2023 03:40:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/3021264#M102798</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-01-15T03:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Re:</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/3021286#M102800</link>
      <description>&lt;P&gt;Thank you so much for helping me getting be better on dax. really appreciate it&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jan 2023 05:23:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Re/m-p/3021286#M102800</guid>
      <dc:creator>Fxelixe</dc:creator>
      <dc:date>2023-01-15T05:23:37Z</dc:date>
    </item>
  </channel>
</rss>

