<?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: Filter within if statement in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-if-statement/m-p/3046721#M104756</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="505053" data-lia-user-login="oaz18" class="lia-mention lia-mention-user"&gt;oaz18&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I understand correctly, you&amp;nbsp; will have to modify the measure you are using in the graph to show the data rather than adding a "ShowHide" measure. The use case is different from the one in the card visual, since here we are talking about modifying the result instead of showing it or not.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you show the code for the main measure in the chart? Plus the structure of the&amp;nbsp;relevant tables involved in that measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="height: 100px; width: 100%; border-collapse: collapse; border-style: groove; border-color: #0c1c49; background-color: #00675f;" border="0" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15px;"&gt;
&lt;TD width="15.961305925030231%" style="width: 92px; height: 15px;"&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84.03869407496977%" style="width: 485px; height: 15px; text-align: left;"&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Please accept the solution when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt; &lt;/FONT&gt;&lt;BR /&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="4.5" color="#FF99CC"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2023 08:15:17 GMT</pubDate>
    <dc:creator>AlB</dc:creator>
    <dc:date>2023-01-27T08:15:17Z</dc:date>
    <item>
      <title>Filter within if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-if-statement/m-p/3045576#M104656</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a bit stuck on how to filter a Show-hide measure I created. To give some context, I have a slicer with the following selections: Georgia and Florida. The slicer is connected to a graph that shows diabetes incidence rates for "Florida" or "Georgia" based on age groups depending on the selection in the slicer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additionally, I have a cards that show incidence rates for Florida or Georgia based on the age groups. When Georgia is selected, I wanted the card for "14 and under" to come up blank so I created the Show-hide measure shown below to do this. I formatted the specific card to show white font when Georgia is selected, since the background is white, the card looks blank.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ShowHide Graph State= if(selectedvalue(slicer_DoseSelector[Column1]) = "Georgia",1,0)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Up until this point the graph with the slicer and "14 and under" card work perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Now I have to update the graph to exclude the "4 years and under" age group if "Georgia" is selected. I thought it may be possible to do this by using a similar measure and adding a filter statement so I tried the measure below: ShowHide Graph Age. I'm not sure if there is a better approach to filter out a specific age group in a graph based on a slicer selection.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Measure with filter (not working - "the syntax is incorrect"):&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ShowHide Graph Age= if(selectedvalue(slicer_DoseSelector[Column1]) = "Georgia",1,0), FILTER('age bracket'[bracket]='4 years and under')&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If anyone can help me learn the correct way to add a filter, I would greatly appreciate it!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 26 Jan 2023 22:11:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-if-statement/m-p/3045576#M104656</guid>
      <dc:creator>oaz18</dc:creator>
      <dc:date>2023-01-26T22:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Filter within if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-if-statement/m-p/3045955#M104678</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="505053" data-lia-user-login="oaz18" class="lia-mention lia-mention-user"&gt;oaz18&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are several major issues with the syntax of that code.&lt;/P&gt;
&lt;P&gt;In any case, I would need first to understand what you want to do. What do you mean exactly by "I'd like to add a filter so anyone 4 years and under is also removed. &lt;STRONG&gt;This measure is then used to filter a graph&lt;/STRONG&gt;. "&lt;/P&gt;
&lt;P&gt;Removed from where?&lt;/P&gt;
&lt;P&gt;What do you mean by a measure filtering a graph?&lt;/P&gt;
&lt;P&gt;Can you provide an example based on sample data to elaborate on the requirements? Include the expected result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="height: 100px; width: 100%; border-collapse: collapse; border-style: groove; border-color: #0c1c49; background-color: #00675f;" border="0" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15px;"&gt;
&lt;TD width="15.961305925030231%" style="width: 92px; height: 15px;"&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84.03869407496977%" style="width: 485px; height: 15px; text-align: left;"&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Please accept the solution when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt; &lt;/FONT&gt;&lt;BR /&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="4.5" color="#FF99CC"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 19:20:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-if-statement/m-p/3045955#M104678</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2023-01-26T19:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Filter within if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-if-statement/m-p/3046197#M104698</link>
      <description>&lt;P&gt;Thank you for your help and apologies for not being more clear. I updated the post with more details on the issue I'm stuck. I hope it's a little clearer this time.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 22:13:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-if-statement/m-p/3046197#M104698</guid>
      <dc:creator>oaz18</dc:creator>
      <dc:date>2023-01-26T22:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Filter within if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-if-statement/m-p/3046721#M104756</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="505053" data-lia-user-login="oaz18" class="lia-mention lia-mention-user"&gt;oaz18&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I understand correctly, you&amp;nbsp; will have to modify the measure you are using in the graph to show the data rather than adding a "ShowHide" measure. The use case is different from the one in the card visual, since here we are talking about modifying the result instead of showing it or not.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you show the code for the main measure in the chart? Plus the structure of the&amp;nbsp;relevant tables involved in that measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="height: 100px; width: 100%; border-collapse: collapse; border-style: groove; border-color: #0c1c49; background-color: #00675f;" border="0" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15px;"&gt;
&lt;TD width="15.961305925030231%" style="width: 92px; height: 15px;"&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84.03869407496977%" style="width: 485px; height: 15px; text-align: left;"&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Please accept the solution when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt; &lt;/FONT&gt;&lt;BR /&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="4.5" color="#FF99CC"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 08:15:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-if-statement/m-p/3046721#M104756</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2023-01-27T08:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Filter within if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-if-statement/m-p/3047543#M104818</link>
      <description>&lt;P&gt;Thank you for all your help! I modified the measure I'm using in the graph by adding a filter to it and that did the trick. Thanks again!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 15:36:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-within-if-statement/m-p/3047543#M104818</guid>
      <dc:creator>oaz18</dc:creator>
      <dc:date>2023-01-27T15:36:54Z</dc:date>
    </item>
  </channel>
</rss>

