Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Context:
In Power BI, I want to create custom labels for my budget values. Currently, I'm using the following DAX measure:
label_Budget =
VAR BudgetAmount = [Budget_amount_total_no_Scope]
RETURN
CALCULATE(SWITCH(
TRUE(),
BudgetAmount > 0 && BudgetAmount < 1000, "€0",
BudgetAmount >= 1000 && BudgetAmount < 100000, "€0,.0K",
BudgetAmount >= 100000 && BudgetAmount < 1000000, "€0,.K",
BudgetAmount >= 1000000, "€0,,.#M") , ALLSELECTED())
My [Budget_amount_total_no_Scope] measure is defined as:
Budget_amount_total_no_Scope = SUM(daily_budget)
Issue:
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.
Objective:
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.
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.
Hi @SilvandeGraaf without model and other details it is hard to provide possible solution.
Still, if you want to create and apply measure with all except logic, try using DAX function ALLEXCEPT on link
Proud to be a Super User!
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
10 | |
6 |