Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
HxH
Advocate II
Advocate II

Formatting different results in a single measure

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 

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", [Quotation Rate],
SELECTEDVALUE(FilterTable[Parameter]) = "Selling Rate", [Selling Rate],
[Leads Managed]
)

The measure works fine, acting exaclty as a filter but working as a "KPI" picker in a bar chart. The only problem is that some of these measures results are whole numbers and some are percentages (the two rate measures).

The original measures are correctly formatted but the problem is that the formatting of the KPI measure overwrites the format settings of the measures! Therefore if I select number as formatting, percentages are show as 0.03, while if I choose percentage as formatting, numbers are show as 700K% 

I would like to know if there is a way I can avoid this kind of behaviour and show the correct formatting for each measure picked.

Thanks
1 ACCEPTED SOLUTION
MartynRamsden
Solution Sage
Solution Sage

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.

View solution in original post

2 REPLIES 2
MartynRamsden
Solution Sage
Solution Sage

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Users online (618)