<?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 DAX Measure not respecting filter context in powerBI visual in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-not-respecting-filter-context-in-powerBI-visual/m-p/4020189#M158594</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Context:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In Power BI, I want to create custom labels for my budget values. Currently, I'm using the following DAX measure:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;label_Budget =&lt;/STRONG&gt;&lt;BR /&gt;VAR BudgetAmount = [Budget_amount_total_no_Scope]&lt;BR /&gt;RETURN&lt;BR /&gt;CALCULATE(SWITCH(&lt;BR /&gt;TRUE(),&lt;BR /&gt;BudgetAmount &amp;gt; 0 &amp;amp;&amp;amp; BudgetAmount &amp;lt; 1000, "€0",&lt;BR /&gt;BudgetAmount &amp;gt;= 1000 &amp;amp;&amp;amp; BudgetAmount &amp;lt; 100000, "€0,.0K",&lt;BR /&gt;BudgetAmount &amp;gt;= 100000 &amp;amp;&amp;amp; BudgetAmount &amp;lt; 1000000, "€0,.K",&lt;BR /&gt;BudgetAmount &amp;gt;= 1000000, "€0,,.#M") , ALLSELECTED())&lt;BR /&gt;&lt;BR /&gt;My [Budget_amount_total_no_Scope] measure is defined as:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Budget_amount_total_no_Scope = SUM(daily_budget)&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Issue:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The issue I'm facing is that the criteria in the label_Budget measure are applied to the total budget values, not per channel. As a result, a channel with a budget less than €1,000,000 gets the same label as a channel with a budget greater than €1,000,000 because the criteria are not applied individually to each channel.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Objective:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I want to modify my measure so that for every selected hierarchy level, the individual channel values are evaluated against the criteria in label_Budget.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone help me adjust this measure so that it correctly applies the criteria at each individual channel level? Any guidance or suggestions would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jul 2024 09:48:36 GMT</pubDate>
    <dc:creator>SilvandeGraaf</dc:creator>
    <dc:date>2024-07-02T09:48:36Z</dc:date>
    <item>
      <title>DAX Measure not respecting filter context in powerBI visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-not-respecting-filter-context-in-powerBI-visual/m-p/4020189#M158594</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Context:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In Power BI, I want to create custom labels for my budget values. Currently, I'm using the following DAX measure:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;label_Budget =&lt;/STRONG&gt;&lt;BR /&gt;VAR BudgetAmount = [Budget_amount_total_no_Scope]&lt;BR /&gt;RETURN&lt;BR /&gt;CALCULATE(SWITCH(&lt;BR /&gt;TRUE(),&lt;BR /&gt;BudgetAmount &amp;gt; 0 &amp;amp;&amp;amp; BudgetAmount &amp;lt; 1000, "€0",&lt;BR /&gt;BudgetAmount &amp;gt;= 1000 &amp;amp;&amp;amp; BudgetAmount &amp;lt; 100000, "€0,.0K",&lt;BR /&gt;BudgetAmount &amp;gt;= 100000 &amp;amp;&amp;amp; BudgetAmount &amp;lt; 1000000, "€0,.K",&lt;BR /&gt;BudgetAmount &amp;gt;= 1000000, "€0,,.#M") , ALLSELECTED())&lt;BR /&gt;&lt;BR /&gt;My [Budget_amount_total_no_Scope] measure is defined as:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Budget_amount_total_no_Scope = SUM(daily_budget)&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Issue:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The issue I'm facing is that the criteria in the label_Budget measure are applied to the total budget values, not per channel. As a result, a channel with a budget less than €1,000,000 gets the same label as a channel with a budget greater than €1,000,000 because the criteria are not applied individually to each channel.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Objective:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I want to modify my measure so that for every selected hierarchy level, the individual channel values are evaluated against the criteria in label_Budget.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone help me adjust this measure so that it correctly applies the criteria at each individual channel level? Any guidance or suggestions would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 09:48:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-not-respecting-filter-context-in-powerBI-visual/m-p/4020189#M158594</guid>
      <dc:creator>SilvandeGraaf</dc:creator>
      <dc:date>2024-07-02T09:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Measure not respecting filter context in powerBI visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-not-respecting-filter-context-in-powerBI-visual/m-p/4020258#M158599</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="769248" data-lia-user-login="SilvandeGraaf" class="lia-mention lia-mention-user"&gt;SilvandeGraaf&lt;/a&gt;&amp;nbsp;without model and other details it is hard to provide possible solution.&lt;/P&gt;
&lt;P&gt;Still, if you want to create and apply measure with all except logic, try using DAX function ALLEXCEPT on &lt;A href="https://learn.microsoft.com/en-us/dax/allexcept-function-dax?WT.mc_id=DP-MVP-4025372" target="_self"&gt;link&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 10:37:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-not-respecting-filter-context-in-powerBI-visual/m-p/4020258#M158599</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2024-07-02T10:37:11Z</dc:date>
    </item>
  </channel>
</rss>

