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.
I have a DAX code in which i'm creating % buckets based on ranges of values...the below is creating a bucket based on where each agent falls according to amount of sales:
Put a check for if the agent is grandfathered before any of the other logic.
SWITCH (
TRUE (),
[IsGrandfatheredAgent], .90,
[TMRA2] >= 0 && [TMRA2] < 16000, .70,
[TMRA2] >= 16000 && [TMRA2] < 36000, .75,
[TMRA2] >= 36000 && [TMRA2] < 66000, .80,
[TMRA2] >= 66000 && [TMRA2] < 91000, .85,
.90
)
Thanks, I can't get that to work though. I created a column to indicate whether or not agent was grandfathered, but i'm not able to add that to the SWITCH formula
If you're writing a measure rather than a calculated column, then you can't just use the column, you need some sort of aggregator. For example, assuming you have a 0/1 column in your agent dimension table,
SWITCH (
TRUE (),
SELECTEDVALUE ( dimAgent[IsGrandfathered] ) = 1, .90,
[TMRA2] >= 0 && [TMRA2] < 16000, .70,
[TMRA2] >= 16000 && [TMRA2] < 36000, .75,
[TMRA2] >= 36000 && [TMRA2] < 66000, .80,
[TMRA2] >= 66000 && [TMRA2] < 91000, .85,
.90
)
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
10 | |
7 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
10 | |
6 |