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.
Hi Power Bi Friends,
Hope you guys having an awesome day. I was wondering how to do range values that will be use for dial gauge in DAX. For example, I have two measures [Total Sales] and [Budget Allocation].
Ranges will be like this
Range 1 = if total sales is 80% below budget allocation
Range 2 = if total sales is in between 80% and 90% of budget allocation
Range 3 = if total sales is greater than the budget allocation
Try the below DAX in a measure. Hope it matches with your requirement.
Ranges =
VAR __Per =
DIVIDE ( [Total Sales], [Budget Allocation] )
RETURN
SWITCH (
TRUE (),
__Per < 0.8, "Range1",
__Per >= 0.8
&& __Per <= 0.9, "Range2",
"Range2"
)
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
10 | |
6 |