<?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: Count on a measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-a-measure/m-p/4182919#M166142</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you define your rows in the summarized table in the measure I recommend, then you can count each category.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please share more detail of the visual you want to have on your dashboard and also dummy samples&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Sep 2024 11:09:02 GMT</pubDate>
    <dc:creator>Selva-Salimi</dc:creator>
    <dc:date>2024-09-27T11:09:02Z</dc:date>
    <item>
      <title>Count on a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-a-measure/m-p/4177637#M165932</link>
      <description>&lt;P&gt;HI All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a running Measure in my pbi where i the out put is put into four seperate catagories. What i would like to have is a count of how many there are of each of the catagories, but i cant seem to get a sum or count fucntion that works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CALCULATE(&lt;BR /&gt;SWITCH( TRUE(),&lt;BR /&gt;[Avg. Days Untill Contract Expires] &amp;gt; 1095, "&amp;gt; 3 years",&lt;BR /&gt;AND([Avg. Days Untill Contract Expires] &amp;lt;= 1095, [Avg. Days Untill Contract Expires] &amp;gt; 730), "2-3 years",&lt;BR /&gt;AND([Avg. Days Untill Contract Expires] &amp;lt;= 730, [Avg. Days Untill Contract Expires] &amp;gt; 365), "1-2 years",&lt;BR /&gt;AND([Avg. Days Untill Contract Expires] &amp;lt;= 365, [Avg. Days Untill Contract Expires] &amp;gt; 180), "&amp;lt; 1 year",&lt;BR /&gt;AND([Avg. Days Untill Contract Expires] &amp;lt;= 180, [Avg. Days Untill Contract Expires] &amp;gt; 0), "&amp;lt; 6 month",&lt;BR /&gt;ISBLANK([Avg. Days Untill Contract Expires]) , "None"),&lt;BR /&gt;ALL('Date')&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 10:42:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-a-measure/m-p/4177637#M165932</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-26T10:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Count on a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-a-measure/m-p/4178087#M165994</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One approach is to create a category table such as the one 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;Example measure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Category Count = 
CALCULATE (
    COUNTROWS ( Contract ),
    Contract[Days to Expiration] &amp;gt; SELECTEDVALUE ( Category[Lower Bound] ),
    Contract[Days to Expiration] &amp;lt;= SELECTEDVALUE ( Category[Upper Bound] )
)&lt;/LI-CODE&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>Thu, 26 Sep 2024 12:52:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-a-measure/m-p/4178087#M165994</guid>
      <dc:creator>DataInsights</dc:creator>
      <dc:date>2024-09-26T12:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Count on a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-a-measure/m-p/4178105#M165996</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do you want to count this measure based on? Is that based on your contracts? if so, you can write another measure as follow: (lets think that your previous measure is called measure 1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;measure 2 := var tbl= summarize(your_table , contract , measure1)&lt;/P&gt;&lt;P&gt;return&lt;/P&gt;&lt;P&gt;countx (filter (tbl , contract = selectedvalue (contract) ) , measure 1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if this measure does not cover your expectations, please share more details.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post helps, then I would appreciate a thumbs up&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;and&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;mark it as the solution&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;to help the other members find it more quickly.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 12:58:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-a-measure/m-p/4178105#M165996</guid>
      <dc:creator>Selva-Salimi</dc:creator>
      <dc:date>2024-09-26T12:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Count on a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-a-measure/m-p/4182102#M166131</link>
      <description>&lt;P&gt;Hi Selva!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Its close to the solution i would like, however not quite. What i would like to have the count of is each of the defined catagories, i.e how mayn rows have the "2-3 years" as a value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem im facing is that the above mesaure cannot be used as a catagory table for the count, but also that&amp;nbsp;&lt;SPAN&gt;[Avg. Days Untill Contract Expires] is a mesure that is under a different table.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Hope this shines a bit more light on what im looking for :).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mvh&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stf&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 08:15:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-a-measure/m-p/4182102#M166131</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-27T08:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Count on a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-a-measure/m-p/4182919#M166142</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you define your rows in the summarized table in the measure I recommend, then you can count each category.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please share more detail of the visual you want to have on your dashboard and also dummy samples&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 11:09:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-a-measure/m-p/4182919#M166142</guid>
      <dc:creator>Selva-Salimi</dc:creator>
      <dc:date>2024-09-27T11:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Count on a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-a-measure/m-p/4233208#M167424</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;，&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May I ask if you have gotten this issue resolved? If it is solved, please mark the helpful reply or share your solution and accept it as solution.&lt;BR /&gt;If not resolved please provide example data. We can better understand the problem and help you. &lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;How to provide sample data in the Power BI Forum - Microsoft Fabric Community&lt;/A&gt;&lt;BR /&gt;Please remove any sensitive data in advance. If uploading pbix files please do not log into your account.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Dengliang Li&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2024 08:31:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-on-a-measure/m-p/4233208#M167424</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-08T08:31:53Z</dc:date>
    </item>
  </channel>
</rss>

