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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Booth070
Frequent Visitor

Dynamic KPI target value - None when filter is on

Hi!

 

I am using the KPI Indicator custom visual (here) to display my metric evolution in time. The metric has a target value of 75 that I have included in the target value field, however, because it's a national metric, I want to avoid the target displaying when an Area filter is selected - so, basically, acting as if there was nothing on the "target value" field.

 

I have created this measure to switch the target value depending on the filter being selected or not:

TargetSwitch = IF(
    ISFILTERED(spain[achievement]),
        BLANK(),[Objective])    

However, instead of eliminating the target value, it seems to have made it 0 (green color in KPI as it was still achieved, variance showing as +Infinity).

 

Is there a way to tell PBI that, when filter is on, a visualizartion field should be considered empty?

 

Edit: I just wanted to add that I have now tried the default KPI visual and I get the same result; obhective shows as blank, but colour is still green.

 

Thanks in advance 

 

 

1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

Hi @Booth070,

 

I'm afraid we can't do it that way. Because the calculation of KPI is in the background. The workaround could be that we can set the "target value" and "actually value" both 0. At least we can get a "0". I would suggest you create an idea here or contact the author of KPI indicator.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-jiascu-msft
Employee
Employee

Hi @Booth070,

 

I'm afraid we can't do it that way. Because the calculation of KPI is in the background. The workaround could be that we can set the "target value" and "actually value" both 0. At least we can get a "0". I would suggest you create an idea here or contact the author of KPI indicator.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for your answer.

 

At the end, I have created two KPIs, one with and one without a target, superposed them and used the measure I created to control when each of them is visible, it does the trick but it's not ideal. I will submit the idea, thanks!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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