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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi All,
I have a measure where the user would be able to display a value of their choice within a linked MAtrix table.
My issue is that one of the option links to a percent measure but the others are decimal number format. What I want to do is amend the code to format 3 of the selections as Decimal Number and the 4th (in red) as Percentage.
Selected Metric =
VAR MySelection =
SELECTEDVALUE('Select Metric'[Measure])
Return
SWITCH (
TRUE (),
MySelection = "Volumes",[Volume YTD],
MySelection = "Forecast",[Cumulative Forecast],
MySelection = "% Forecast Met",[Ytd % Forecast Met],MySelection = "Variance",[Cumulative Variance],
[Volume YTD]
)thanks in advance for any assistance offered.
Cheers
Solved! Go to Solution.
Hi @Anonymous,
If you just want to show the number as a percentage, you can try this formula.
Selected Metric = VAR MySelection = SELECTEDVALUE ( 'Select Metric'[Measure] ) RETURN SWITCH ( MySelection, "Volumes", [Volume YTD], "Forecast", [Cumulative Forecast], "% Forecast Met", FORMAT ( [Ytd % Forecast Met], "0.00%" ), "Variance", [Cumulative Variance], [Volume YTD] )
Best Regards,
Hi @Anonymous,
If you just want to show the number as a percentage, you can try this formula.
Selected Metric = VAR MySelection = SELECTEDVALUE ( 'Select Metric'[Measure] ) RETURN SWITCH ( MySelection, "Volumes", [Volume YTD], "Forecast", [Cumulative Forecast], "% Forecast Met", FORMAT ( [Ytd % Forecast Met], "0.00%" ), "Variance", [Cumulative Variance], [Volume YTD] )
Best Regards,
Awesome! Thank you, that's done the job.
Thanks
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 56 | |
| 43 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 123 | |
| 108 | |
| 44 | |
| 32 | |
| 24 |