Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi everyone,
I have created the following measure which, according to the selection made in a "fake" filter (fake because it is not actually propagating any filter context, it is just a parameter table to activate the selectedvalue function), shows a different measure
Solved! Go to Solution.
Hi @HxH
Unfortunatley, this is currently a limitation in Power BI.
There's a popular idea over at ideas.powerbi.com - make sure you vote it up: ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/15231165-conditional-formatted-measures-u...
If your measure will be displayed in a table, you can use the FORMAT function within your SWITCH expression to make a string.
For example:
Kpi =
SWITCH (
TRUE (),
SELECTEDVALUE ( FilterTable[Parameter] ) = "Leads Managed", [Leads Managed],
SELECTEDVALUE ( FilterTable[Parameter] ) = "Quotations", [Quotations],
SELECTEDVALUE ( FilterTable[Parameter] ) = "Contracts", [Contracts],
SELECTEDVALUE ( FilterTable[Parameter] ) = "Quotation Rate", FORMAT ( [Quotation Rate], "0.0%" ),
SELECTEDVALUE ( FilterTable[Parameter] ) = "Selling Rate", FORMAT ( [Selling Rate], "0.0%" ),
[Leads Managed]
)
Best regards,
Martyn
If I answered your question, please help others by accepting it as a solution.
Hi @HxH
Unfortunatley, this is currently a limitation in Power BI.
There's a popular idea over at ideas.powerbi.com - make sure you vote it up: ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/15231165-conditional-formatted-measures-u...
If your measure will be displayed in a table, you can use the FORMAT function within your SWITCH expression to make a string.
For example:
Kpi =
SWITCH (
TRUE (),
SELECTEDVALUE ( FilterTable[Parameter] ) = "Leads Managed", [Leads Managed],
SELECTEDVALUE ( FilterTable[Parameter] ) = "Quotations", [Quotations],
SELECTEDVALUE ( FilterTable[Parameter] ) = "Contracts", [Contracts],
SELECTEDVALUE ( FilterTable[Parameter] ) = "Quotation Rate", FORMAT ( [Quotation Rate], "0.0%" ),
SELECTEDVALUE ( FilterTable[Parameter] ) = "Selling Rate", FORMAT ( [Selling Rate], "0.0%" ),
[Leads Managed]
)
Best regards,
Martyn
If I answered your question, please help others by accepting it as a solution.
Hi,
thanks for the reply, I'll definitely vote for the idea.
I had already thought about that solution and tried it out but as you said it only works in a table and not as a "data label" formatter in a chart of any kind.
Thanks anyway
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
124 | |
76 | |
74 | |
58 | |
49 |
User | Count |
---|---|
166 | |
84 | |
68 | |
67 | |
57 |