<?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: Need help on a Measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-a-Measure/m-p/1888089#M40665</link>
    <description>&lt;P&gt;Hi Amit,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanx for your response.&lt;/P&gt;&lt;P&gt;I am not able to get this working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Still not sure what the error is.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And wrt sharing a sample file, I am not able to do it since it is a direct query mode to the servers with lot of data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any ther solution that you can help me out with?&lt;/P&gt;</description>
    <pubDate>Tue, 08 Jun 2021 13:03:51 GMT</pubDate>
    <dc:creator>Shashanth</dc:creator>
    <dc:date>2021-06-08T13:03:51Z</dc:date>
    <item>
      <title>Need help on a Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-a-Measure/m-p/1887567#M40648</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to get the Product_id_count with a few filters. But which ever method I try, I am not able to get it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I have 2 &lt;STRONG&gt;summarized&lt;/STRONG&gt; tables ; &lt;STRONG&gt;calculated_Product_rating_table&lt;/STRONG&gt; and&amp;nbsp;&lt;STRONG&gt;calculated_service_rating_table. &lt;/STRONG&gt;Both are are tables from a main table in the direct query mode.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;It is only these 2 tables that are summarized which is causing the storage mode to be Mixed(&lt;EM&gt;not sure if this info makes any difference to the answer, but just mentioning it for better clarity&lt;/EM&gt;). The common field is &lt;STRONG&gt;product_id.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My requirement is to get the distinct count of product_id's&lt;/P&gt;&lt;P&gt;where&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(calculated_Product_rating_table[Overall_Approval__Rate&amp;gt;60%]=TRUE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;calculated_Product_rating_table[TV_Approval__Rate&amp;gt;50%]=TRUE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;calculated_service_rating_table[TV Repeat &amp;gt;= 150%])=TRUE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;calculated_service_rating_table[Overall Repeat &amp;gt;= 300%])=TRUE)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried the below formulas but none of them worked, all gave me one or the other error. Hence asking you for help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;product_id_count = CALCULATE(DISTINCTCOUNTNOBLANK(calculated_Product_rating_table[product_id]),OR(or(calculated_Product_rating_table[Overall_Approval__Rate&amp;gt;60%]=TRUE,calculated_Product_rating_table[TV_Approval__Rate&amp;gt;50%]=TRUE),or(LOOKUPVALUE(calculated_service_rating_table[Overall Repeat &amp;gt;= 300%],calculated_Product_rating_table[product_id],calculated_service_rating_table[product_id])=TRUE,LOOKUPVALUE(calculated_service_rating_table[TV Repeat &amp;gt;= 150%],calculated_Product_rating_table[product_id],calculated_service_rating_table[product_id])=TRUE)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;product_id_count = CALCULATE(DISTINCTCOUNTNOBLANK(calculated_Product_rating_table[product_id]),or(or(calculated_Product_rating_table[Overall_Approval__Rate&amp;gt;60%]=TRUE,calculated_Product_rating_table[TV_Approval__Rate&amp;gt;50%]=TRUE),(or(related(calculated_service_rating_table[TV Repeat &amp;gt;= 150%])=TRUE,related(calculated_service_rating_table[Overall Repeat &amp;gt;= 300%])=TRUE))))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;product_id_count =&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE(DISTINCTCOUNTNOBLANK(calculated_Product_rating_table[product_id]),or((FILTER(calculated_Product_rating_table,or(calculated_Product_rating_table[Overall_Approval__Rate&amp;gt;60%]=TRUE,calculated_Product_rating_table[TV_Approval__Rate&amp;gt;50%]=TRUE))),(FILTER(calculated_service_rating_table,or(calculated_service_rating_table[TV Repeat &amp;gt;= 150%]=TRUE,calculated_service_rating_table[Overall Repeat &amp;gt;= 300%]=TRUE)))))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;product_id_count =&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE(DISTINCTCOUNTNOBLANK(calculated_Product_rating_table[product_id]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;or(calculated_Product_rating_table[Overall_Approval__Rate&amp;gt;60%]=TRUE,or(calculated_Product_rating_table[TV_Approval__Rate&amp;gt;50%]=TRUE,or(calculated_service_rating_table[TV Repeat &amp;gt;= 150%]=true,calculated_service_rating_table[Overall Repeat &amp;gt;= 300%]=true))))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;-Shashanth&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 08 Jun 2021 10:11:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-a-Measure/m-p/1887567#M40648</guid>
      <dc:creator>Shashanth</dc:creator>
      <dc:date>2021-06-08T10:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on a Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-a-Measure/m-p/1887894#M40659</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="282385" data-lia-user-login="Shashanth" class="lia-mention lia-mention-user"&gt;Shashanth&lt;/a&gt; , Try like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;product_id_count = CALCULATE(DISTINCTCOUNTNOBLANK(calculated_Product_rating_table[product_id]),filter(values(calculated_Product_rating_table[product_id]), OR(or(calculated_Product_rating_table[Overall_Approval__Rate&amp;gt;60%]=TRUE,calculated_Product_rating_table[TV_Approval__Rate&amp;gt;50%]=TRUE),or(LOOKUPVALUE(calculated_service_rating_table[Overall Repeat &amp;gt;= 300%],calculated_Product_rating_table[product_id],calculated_service_rating_table[product_id])=TRUE,LOOKUPVALUE(calculated_service_rating_table[TV Repeat &amp;gt;= 150%],calculated_Product_rating_table[product_id],calculated_service_rating_table[product_id])=TRUE))))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 12:08:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-a-Measure/m-p/1887894#M40659</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-06-08T12:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on a Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-a-Measure/m-p/1888089#M40665</link>
      <description>&lt;P&gt;Hi Amit,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanx for your response.&lt;/P&gt;&lt;P&gt;I am not able to get this working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Still not sure what the error is.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And wrt sharing a sample file, I am not able to do it since it is a direct query mode to the servers with lot of data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any ther solution that you can help me out with?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 13:03:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-a-Measure/m-p/1888089#M40665</guid>
      <dc:creator>Shashanth</dc:creator>
      <dc:date>2021-06-08T13:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on a Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-a-Measure/m-p/1890741#M40725</link>
      <description>&lt;P&gt;Guys, I was able to find a solution. A collegue of mine helped me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically we created an other table WITHOUT USING &lt;EM&gt;SUMMARIZE(I did not know this was possible/allowed)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Final_Table = DISTINCT(calculated_Product_rating_table[product_id])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;and added all the columns that I wanted to add a filter on,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[Overall Repeat___rate &amp;gt;= 300%] = LOOKUPVALUE(calculated_service_rating_table[Overall Repeat &amp;gt;= 300%],calculated_Product_rating_table[product_id],Final_Table[product_id])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Overall_Approval___Rate&amp;gt;60% = LOOKUPVALUE(calculated_Product_rating_table[Overall_Approval__Rate&amp;gt;60%],calculated_Product_rating_table[product_id],Final_Table[product_id])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[TV Repeat___rate &amp;gt;= 150%] = LOOKUPVALUE(calculated_service_rating_table[TV Repeat &amp;gt;= 150%],calculated_Product_rating_table[product_id],Final_Table[product_id])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TV_Approval___Rate&amp;gt;50% = LOOKUPVALUE(calculated_Product_rating_table[TV_Approval__Rate&amp;gt;50%],calculated_Product_rating_table[product_id],Final_Table[product_id])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;And finally created a column with an OR function, that I finally wanted&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Required product_id's = or(Final_Table[Overall Repeat___rate &amp;gt;= 300%]=true,or(Final_Table[TV_Approval___Rate&amp;gt;50%]=true,or(Final_Table[Overall Repeat___rate &amp;gt;= 300%]=true,Final_Table[TV Repeat___rate &amp;gt;= 150%]=true)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;and created a measure on it&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;product_id_count = CALCULATE(DISTINCTCOUNT(Final_Table[product_id]),Final_Table[Required FSN's]=true)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks to him. FInally I was able to do it.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;-Shashanth&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 09 Jun 2021 11:46:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-on-a-Measure/m-p/1890741#M40725</guid>
      <dc:creator>Shashanth</dc:creator>
      <dc:date>2021-06-09T11:46:48Z</dc:date>
    </item>
  </channel>
</rss>

