<?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 measure results based on conditions/Create a Table based on measure results to make a donut ch in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-measure-results-based-on-conditions-Create-a-Table-based/m-p/2700845#M81753</link>
    <description>&lt;P&gt;I will try it and see whether it'll work, will let you know, THANK YOU!&lt;/P&gt;</description>
    <pubDate>Mon, 15 Aug 2022 15:43:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-08-15T15:43:31Z</dc:date>
    <item>
      <title>Count measure results based on conditions/Create a Table based on measure results to make a donut ch</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-measure-results-based-on-conditions-Create-a-Table-based/m-p/2700563#M81724</link>
      <description>&lt;P&gt;Basically, title. There is a measure that was supposed to serve as a conditional formatting based on values one of the measure's.&lt;BR /&gt;&lt;BR /&gt;the end code (formatted for privacy reasons) as follows:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; I would like to count how many values were labeled as "FlagLow", "FlagHigh" and "FlagMedium" to put them into Donut Chart.&lt;BR /&gt;I was thinking of putting them into table, but I don't know how do I put the results of SWITCH() function into the table either.&lt;BR /&gt;&lt;BR /&gt;Somebody has an idea how do I get the count of 'flags"?&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 13:51:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-measure-results-based-on-conditions-Create-a-Table-based/m-p/2700563#M81724</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-15T13:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: Count measure results based on conditions/Create a Table based on measure results to make a donut ch</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-measure-results-based-on-conditions-Create-a-Table-based/m-p/2700618#M81732</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;You need to create a disconnected filter table containing the three flag values. DAX will take care of the rest but you need to specify this counting will be based on what? In oter words how many times per what? Per date? Per customer? Per product? What were you slicing by before counting?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 14:05:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-measure-results-based-on-conditions-Create-a-Table-based/m-p/2700618#M81732</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-08-15T14:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Count measure results based on conditions/Create a Table based on measure results to make a donut ch</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-measure-results-based-on-conditions-Create-a-Table-based/m-p/2700785#M81746</link>
      <description>&lt;P&gt;Situation:&lt;BR /&gt;The counting should be based on 'Project Name' column. So at the end it should be somthing like:&lt;BR /&gt;- How many projects are there with "FlagHigh"?&lt;BR /&gt;- How many are with "FlagRed"?&lt;BR /&gt;- "FlagMedium"?&lt;BR /&gt;&lt;BR /&gt;Could you elaborate on disconnected filter table, please? I am new to this stuff...&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 15:23:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-measure-results-based-on-conditions-Create-a-Table-based/m-p/2700785#M81746</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-15T15:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Count measure results based on conditions/Create a Table based on measure results to make a donut ch</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-measure-results-based-on-conditions-Create-a-Table-based/m-p/2700834#M81752</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;The disconnected filter table is a table that contains all the unique statuses (the 3 flags) you can create it in excel along with numeric sorting column (required only to sort the flag column in the visual in the desired order) or you can use the folowing code to create a calculated table using DAX&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Fiter Table =
VAR T1 =
    SELECTCOLUMNS ( GENERATESERIES ( 1, 3, 1 ), "Sort", [Value] )
VAR T2 =
    ADDCOLUMNS (
        T1,
        "Flag", SWITCH ( [Sort], 1, "FlagHigh", 2, "FlagMedium", 3, "FlagRed" )
    )
RETURN
    T2&lt;/LI-CODE&gt;&lt;P&gt;This table has NO RELATIONSHIPS with any other table in your model. You just need to use it to slice by in your visuals, for example to place it in the rows of a matrix visual or use it in a slicer.&lt;/P&gt;&lt;P&gt;Once this table is created, place the [Flag] column in a table visual then place the following measure along with it.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Flag Count =
VAR CurrentFlag =
    SELECTEDVALUE ( 'Filter Table'[Flag] )
VAR T1 =
    ADDCOLUMNS ( VALUES ( TableName[Project Name] ), "@Flag", [MeasureName] )
VAR T2 =
    FILTER ( T1, [@Flag] = CurrentFlag )
RETURN
    COUNTROWS ( T2 )&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 15 Aug 2022 15:41:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-measure-results-based-on-conditions-Create-a-Table-based/m-p/2700834#M81752</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-08-15T15:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Count measure results based on conditions/Create a Table based on measure results to make a donut ch</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-measure-results-based-on-conditions-Create-a-Table-based/m-p/2700845#M81753</link>
      <description>&lt;P&gt;I will try it and see whether it'll work, will let you know, THANK YOU!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 15:43:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-measure-results-based-on-conditions-Create-a-Table-based/m-p/2700845#M81753</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-15T15:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Count measure results based on conditions/Create a Table based on measure results to make a donut ch</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-measure-results-based-on-conditions-Create-a-Table-based/m-p/2702142#M81832</link>
      <description>&lt;P&gt;You are godlike. Thank you, it worked as expected.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;But there is one thing that bothers me. I've added the last flag which explains "No Next Phase" of the project, I got it into measure of conditional formatting. But it doesn't do anything, and its pard does not appear on the chart.&lt;BR /&gt;&lt;BR /&gt;Long story short: if project has "No Next Phase" text value, it should be labeled with "FlagBlack" and count how many of them are there. I did everything that's supposed to be reasonable but it didn't work!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 07:08:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-measure-results-based-on-conditions-Create-a-Table-based/m-p/2702142#M81832</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-16T07:08:49Z</dc:date>
    </item>
  </channel>
</rss>

