<?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 Calculated measure not responding to my slicers in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-measure-not-responding-to-my-slicers/m-p/3119413#M110565</link>
    <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a dashboard for my project that includes various demographic information (e.g. gender, nationality, vulnerabilities...etc.).&amp;nbsp;Each case may contain multiple vulnerabilities.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want my graph on Power BI to include the values for each individual vulnerability (similar to countif on excel). Most importantly, I didn't want the cells that contain multiple vulnerabilities to result in a new aggregated type of vulnerability.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Through a google search, I was able to find the following DAX formula which &lt;SPAN&gt;I repeated the same steps for all of the vulnerabilities&lt;/SPAN&gt;:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Child/ Youth = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;COUNT&lt;/SPAN&gt;&lt;SPAN&gt;(Sheet1[Vulnerability,&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(Sheet1),[Vulnerability]=&lt;/SPAN&gt;&lt;SPAN&gt;"Child/ Youth"&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The measure worked perfectly and I was able to create a clear donut chart using the newly calculated measures.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;However, my chart is not responding to my slicer.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;How can I fix that?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 08 Mar 2023 16:36:08 GMT</pubDate>
    <dc:creator>gghanem</dc:creator>
    <dc:date>2023-03-08T16:36:08Z</dc:date>
    <item>
      <title>Calculated measure not responding to my slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-measure-not-responding-to-my-slicers/m-p/3119413#M110565</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a dashboard for my project that includes various demographic information (e.g. gender, nationality, vulnerabilities...etc.).&amp;nbsp;Each case may contain multiple vulnerabilities.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want my graph on Power BI to include the values for each individual vulnerability (similar to countif on excel). Most importantly, I didn't want the cells that contain multiple vulnerabilities to result in a new aggregated type of vulnerability.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Through a google search, I was able to find the following DAX formula which &lt;SPAN&gt;I repeated the same steps for all of the vulnerabilities&lt;/SPAN&gt;:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Child/ Youth = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;COUNT&lt;/SPAN&gt;&lt;SPAN&gt;(Sheet1[Vulnerability,&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(Sheet1),[Vulnerability]=&lt;/SPAN&gt;&lt;SPAN&gt;"Child/ Youth"&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The measure worked perfectly and I was able to create a clear donut chart using the newly calculated measures.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;However, my chart is not responding to my slicer.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;How can I fix that?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Mar 2023 16:36:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-measure-not-responding-to-my-slicers/m-p/3119413#M110565</guid>
      <dc:creator>gghanem</dc:creator>
      <dc:date>2023-03-08T16:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated measure not responding to my slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-measure-not-responding-to-my-slicers/m-p/3119608#M110573</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="526254" data-lia-user-login="gghanem" class="lia-mention lia-mention-user"&gt;gghanem&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;The ALL function removes all filters. As of you measures you can use&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Child/ Youth =
CALCULATE (
    COUNT ( Sheet1[Vulnerability] ),
    Sheet1[Vulnerability] = "Child/ Youth"
)&lt;/LI-CODE&gt;
&lt;P&gt;However there is no need to create a seperate measure for each&amp;nbsp;&lt;SPAN&gt;Vulnerability rtaher you can place the [Vulnerability] column in the legend of the donut chart and place the following measure in the values&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Count = COUNT ( Sheet1[Vulnerability] )&lt;/LI-CODE&gt;
&lt;P&gt;or even&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count = COUNTROWS ( Sheet1 )&lt;/LI-CODE&gt;
&lt;P&gt;and it should work&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 17:55:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-measure-not-responding-to-my-slicers/m-p/3119608#M110573</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-08T17:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated measure not responding to my slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-measure-not-responding-to-my-slicers/m-p/3120802#M110667</link>
      <description>&lt;P&gt;Hello&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the advice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this but it resulted in the aggregation that I was trying to avoid.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The problem here is that some cases have multiple vulnerabilities at once but I don't want to highlight the combination of vulnerabilities.&lt;/P&gt;&lt;P&gt;Rather, the graph that I want would only show the 6 primary categories as such:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This graph was created from the calculated measures using the formula I had shared in the first message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to accomplish this without severing the connection to the slicers?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 07:55:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-measure-not-responding-to-my-slicers/m-p/3120802#M110667</guid>
      <dc:creator>gghanem</dc:creator>
      <dc:date>2023-03-09T07:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated measure not responding to my slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-measure-not-responding-to-my-slicers/m-p/3120850#M110676</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="526254" data-lia-user-login="gghanem" class="lia-mention lia-mention-user"&gt;gghanem&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Just create a new&lt;STRONG&gt; calculated column&lt;/STRONG&gt;&amp;nbsp;in the data table that categorize/group them into 6 groups.&lt;/P&gt;
&lt;P&gt;Somthing like:&lt;BR /&gt;Category =&lt;BR /&gt;SWITCH (&lt;BR /&gt;TRUE ( ),&lt;BR /&gt;'Table'[Vulnerability] IN { "CHILD/YOUTH",&amp;nbsp; "CHILD /YOUTH",&amp;nbsp;&amp;nbsp; "CHILD/ YOUTH",&amp;nbsp; "CHILD / YOUTH" },&amp;nbsp;"CHILD/YOUTH",&lt;BR /&gt;etc..&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 08:18:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-measure-not-responding-to-my-slicers/m-p/3120850#M110676</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-09T08:18:08Z</dc:date>
    </item>
  </channel>
</rss>

