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
User | Count |
---|---|
141 | |
71 | |
70 | |
54 | |
53 |
User | Count |
---|---|
208 | |
95 | |
64 | |
61 | |
57 |