The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |