<?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: A measure using IF condition with a column reference in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-using-IF-condition-with-a-column-reference/m-p/3159101#M113393</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="512298" data-lia-user-login="kmartink" class="lia-mention lia-mention-user"&gt;kmartink&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;make sure you have created a measure not a calculated column by mistake&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Mar 2023 17:46:36 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-03-28T17:46:36Z</dc:date>
    <item>
      <title>A measure using IF condition with a column reference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-using-IF-condition-with-a-column-reference/m-p/3158828#M113374</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;Hi, I'm using a slicer filtering the weeks and have made this measure to calculate how many days in a selected week was a score below 80%.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Low Score = &lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;IF(&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; CALCULATE(SUM('Table'[Score]))&amp;gt;=0.8,&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; 0,&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; CALCULATE(DISTINCTCOUNT('Table'[Weekday]),FILTER('Table','Table'[Score]&amp;lt;0.8)))&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;However, the measure always returns 0 even though there were some days with a score below 80%. How can I fix it?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank you for your help.&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Mar 2023 15:08:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-using-IF-condition-with-a-column-reference/m-p/3158828#M113374</guid>
      <dc:creator>kmartink</dc:creator>
      <dc:date>2023-03-28T15:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: A measure using IF condition with a column reference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-using-IF-condition-with-a-column-reference/m-p/3159101#M113393</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="512298" data-lia-user-login="kmartink" class="lia-mention lia-mention-user"&gt;kmartink&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;make sure you have created a measure not a calculated column by mistake&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2023 17:46:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-using-IF-condition-with-a-column-reference/m-p/3159101#M113393</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-28T17:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: A measure using IF condition with a column reference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-using-IF-condition-with-a-column-reference/m-p/3160088#M113448</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yes what I've created is a measure. I was wondering if the problem might be caused either by that the formula accidentally summarizes all the rows of the "Score" column which would mean the result would be always higher than 80% and so the zero will be displayed? Or either that my "Score" has the Data type "decimal number" and the format "percentage" but the formula uses "0.8" for 80%?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any other way how to rewrite the formula so it might not be accidentally summing up all the rows of the column "Score" if that's the case what's happening right now? I already tried to use "AVERAGE" instead of "SUM" but there wasn't any difference. Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 07:04:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-using-IF-condition-with-a-column-reference/m-p/3160088#M113448</guid>
      <dc:creator>kmartink</dc:creator>
      <dc:date>2023-03-29T07:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: A measure using IF condition with a column reference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-using-IF-condition-with-a-column-reference/m-p/3160185#M113457</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="512298" data-lia-user-login="kmartink" class="lia-mention lia-mention-user"&gt;kmartink&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Would you please present sample fo the data and perhaps a screenshot of the visual?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 07:45:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-using-IF-condition-with-a-column-reference/m-p/3160185#M113457</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-29T07:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: A measure using IF condition with a column reference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-using-IF-condition-with-a-column-reference/m-p/3160811#M113508</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my data sample of the Score:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this is the visual:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 12:36:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-using-IF-condition-with-a-column-reference/m-p/3160811#M113508</guid>
      <dc:creator>kmartink</dc:creator>
      <dc:date>2023-03-29T12:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: A measure using IF condition with a column reference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-using-IF-condition-with-a-column-reference/m-p/3160923#M113520</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="512298" data-lia-user-login="kmartink" class="lia-mention lia-mention-user"&gt;kmartink&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess you are just trying to have in a card visual the count of the days that have scores less than 0.8?&lt;/P&gt;
&lt;P&gt;if this is the case please try&lt;/P&gt;
&lt;P&gt;Low Score =&lt;BR /&gt;SUMX (&lt;BR /&gt;DISTINCTCOUNT ( 'Table'[Date] ),&lt;BR /&gt;IF ( CALCULATE ( SUM ( 'Table'[Score] ) ) &amp;lt; 0.8, 1 )&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 13:12:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-using-IF-condition-with-a-column-reference/m-p/3160923#M113520</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-29T13:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: A measure using IF condition with a column reference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-using-IF-condition-with-a-column-reference/m-p/3163007#M113654</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;this is the error I get when I use your formula:&amp;nbsp;&lt;STRONG&gt;The SUMX function expects a table expression for argument '1', but a string or numeric expression was used.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 09:40:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-using-IF-condition-with-a-column-reference/m-p/3163007#M113654</guid>
      <dc:creator>kmartink</dc:creator>
      <dc:date>2023-03-30T09:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: A measure using IF condition with a column reference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-using-IF-condition-with-a-column-reference/m-p/3163020#M113657</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="512298" data-lia-user-login="kmartink" class="lia-mention lia-mention-user"&gt;kmartink&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Apologies, my mistake&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Low Score =
SUMX (
    DISTINCT ( 'Table'[Date] ),
    IF ( CALCULATE ( SUM ( 'Table'[Score] ) ) &amp;lt; 0.8, 1 )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 30 Mar 2023 09:46:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-measure-using-IF-condition-with-a-column-reference/m-p/3163020#M113657</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-30T09:46:02Z</dc:date>
    </item>
  </channel>
</rss>

