Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have a dynamic measure that, based on measure filter selection, it will show either Gross Revenue or Shipment Count. It works fine when there is no formatting set, but I would like to display Gross Revenue as dollars, while keeping Shipment Count as an integer. It seems to work fine in a table, but formatted values won't work in a chart. Is there any way to make this work?
Without formatting:
Selected Metric = SWITCH(
SELECTEDVALUE('Measure Selection'[MeasureID]),
"GrossRevenue", [Gross Revenue],
"ShipmentCount", [Shipment Count],
BLANK()
)
With formatting:
Selected Metric = SWITCH(
SELECTEDVALUE('Measure Selection'[MeasureID]),
"GrossRevenue", format([Gross Revenue], "$#,##0"),
"ShipmentCount", [Shipment Count],
BLANK()
)
Follow-up question. Is it possible to dynamically change the measure name on visuals based on filter value selection?
Solved! Go to Solution.
Hi @smileamile2 , Format doesn't work within a line chart from my knowledge. Would another approach to be create a bookmark and create a button selection, so the user can switch between both. It would give you the flexbility you need.
@davehus Ah darn. Main point was to not have to setup so many measures, because I have a ton of metrics to add to the list, and need to have current, last year, YoY, PoP, Variances, and Variance % for all of them. Bummer. Appreciate the help!
No problem, sometimes these things are never as straigforward as you'd hope. 🙂
D
Hi @smileamile2 , Format doesn't work within a line chart from my knowledge. Would another approach to be create a bookmark and create a button selection, so the user can switch between both. It would give you the flexbility you need.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 35 | |
| 34 | |
| 27 |
| User | Count |
|---|---|
| 136 | |
| 96 | |
| 77 | |
| 67 | |
| 65 |