<?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: DAX to Count IDs that have gained on their previous scores in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-Count-IDs-that-have-gained-on-their-previous-scores/m-p/3560437#M137224</link>
    <description>&lt;P&gt;Changed it to CountX, works alright.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Stupendous work mate, many thanks&lt;/P&gt;</description>
    <pubDate>Thu, 30 Nov 2023 07:49:24 GMT</pubDate>
    <dc:creator>AlwaysAGooner</dc:creator>
    <dc:date>2023-11-30T07:49:24Z</dc:date>
    <item>
      <title>DAX to Count IDs that have gained on their previous scores</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-Count-IDs-that-have-gained-on-their-previous-scores/m-p/3560235#M137201</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a need to identify IDs in my data who have gone forwards on scoring if interviewed more than once. Set of IDs are evaluated for a Brand and based on responses a scoring value is assigned.&lt;BR /&gt;&lt;BR /&gt;There could be a scenario where some IDs have scored more than what they had scored previously, i.e. I scored 2 in Apr'23 and Aug I scored 3.&lt;BR /&gt;All this (DAX Measure) must be responsive to date slicer, so the counting should happen only within the selected date range.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, to summarize, the requirement is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Identify Ids using a measure that have scored better than what they scored previously (have upgraded). One such case highlighted in the image, should only calculate for cases where an ID has been evaluated more than once&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestion/leads will be greatly appreciated.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 30 Nov 2023 05:45:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-Count-IDs-that-have-gained-on-their-previous-scores/m-p/3560235#M137201</guid>
      <dc:creator>AlwaysAGooner</dc:creator>
      <dc:date>2023-11-30T05:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: DAX to Count IDs that have gained on their previous scores</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-Count-IDs-that-have-gained-on-their-previous-scores/m-p/3560370#M137217</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="587906" data-lia-user-login="AlwaysAGooner" class="lia-mention lia-mention-user"&gt;AlwaysAGooner&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure if i fully get you, try to plot a measure like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _table =
ADDCOLUMNS(
    VALUES(data[brand]),
    "LastDateScore",
    VAR _lastdate = CALCULATE(MAX(data[date]))
    RETURN
    CALCULATE(
        MAX(data[score]),
        data[date] = _lastdate        
    ),
    "2ndLastDateScore",
    VAR _lastdate = CALCULATE(MAX(data[date]))
    VAR _2ndlastdate =
    CALCULATE(
        MAX(data[date]),
        data[date] &amp;lt; _lastdate
    )
    RETURN
    CALCULATE(
        MAX(data[score]),
        data[date] =  _2ndlastdate
    )
)
VAR _list = 
CALCULATETABLE(
    VALUES(data[brand]),
    FILTER(
        _table,
        [LastDateScore]&amp;gt;[2ndLastDateScore]
            &amp;amp;&amp;amp;[2ndLastDateScore]&amp;lt;&amp;gt;BLANK()
    )
)
RETURN CONCATENATEX(_list, data[brand], ", ")&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it worked like:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 07:17:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-Count-IDs-that-have-gained-on-their-previous-scores/m-p/3560370#M137217</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-11-30T07:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: DAX to Count IDs that have gained on their previous scores</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-Count-IDs-that-have-gained-on-their-previous-scores/m-p/3560390#M137218</link>
      <description>&lt;P&gt;Thanks. I just need the count not the actuals. So while looking at Brand A for Q1 2023, how many picked on their previous scores.&lt;/P&gt;&lt;P&gt;Pls suggest.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 07:23:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-Count-IDs-that-have-gained-on-their-previous-scores/m-p/3560390#M137218</guid>
      <dc:creator>AlwaysAGooner</dc:creator>
      <dc:date>2023-11-30T07:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: DAX to Count IDs that have gained on their previous scores</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-Count-IDs-that-have-gained-on-their-previous-scores/m-p/3560399#M137220</link>
      <description>&lt;P&gt;try like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _table =
ADDCOLUMNS(
    VALUES(data[brand]),
    "LastDateScore",
    VAR _lastdate = CALCULATE(MAX(data[date]))
    RETURN
    CALCULATE(
        MAX(data[score]),
        data[date] = _lastdate        
    ),
    "2ndLastDateScore",
    VAR _lastdate = CALCULATE(MAX(data[date]))
    VAR _2ndlastdate =
    CALCULATE(
        MAX(data[date]),
        data[date] &amp;lt; _lastdate
    )
    RETURN
    CALCULATE(
        MAX(data[score]),
        data[date] =  _2ndlastdate
    )
)
RETURN 
COUNTROWS(
    FILTER(
        _table,
        [LastDateScore]&amp;gt;[2ndLastDateScore]
            &amp;amp;&amp;amp;[2ndLastDateScore]&amp;lt;&amp;gt;BLANK()
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 30 Nov 2023 07:32:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-Count-IDs-that-have-gained-on-their-previous-scores/m-p/3560399#M137220</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-11-30T07:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: DAX to Count IDs that have gained on their previous scores</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-Count-IDs-that-have-gained-on-their-previous-scores/m-p/3560437#M137224</link>
      <description>&lt;P&gt;Changed it to CountX, works alright.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Stupendous work mate, many thanks&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 07:49:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-Count-IDs-that-have-gained-on-their-previous-scores/m-p/3560437#M137224</guid>
      <dc:creator>AlwaysAGooner</dc:creator>
      <dc:date>2023-11-30T07:49:24Z</dc:date>
    </item>
  </channel>
</rss>

