Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
77 | |
74 | |
42 | |
32 | |
28 |
User | Count |
---|---|
100 | |
93 | |
52 | |
50 | |
48 |