Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
216 | |
89 | |
82 | |
66 | |
57 |