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
Miguel_Rojo
Frequent Visitor

When using SWITCH funciton to call other measures, returns BLANK() instead of "0"

Hi Community!

 

When I create a measure using the SWITCH() function that calls other measures depending of the selection in one slicer, the result shows as “Blank” values the “0” figure, Do you know how can I fix that?

 

Here’s a detail explanation:

 

  1. The [Total Web Leads] measure is a simple sum of the “Leads” column:

P1.png

 

  1. The [LM Web Leads] measure is a simple sum of the “Leads” column, showing the “Last Month”:

P2.png

 

  1. The [%▲ MoM Web Leads] measure calculates the MoM growth:

P3.png

 

If I use them directly in a Matrix, when the result is “0”, it shows “0” (that’s what I want):

P4.png

 

But, when I use the next measure that “calls them” depending of the option selected in the Slicer, instead of “0” it shows BLANK(), do you know how can be solved that???

P5.png

 

P6.png

 

 

 

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@Miguel_Rojo,

 

Field parameters offer a better way to achieve this. Instead of using a SWITCH measure, simply add each measure to a field parameter. These measures will be available in a slicer, and the formatting of each measure will be used in visuals.

 

https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
Miguel_Rojo
Frequent Visitor

@DataInsights you're bloody great man

DataInsights
Super User
Super User

@Miguel_Rojo,

 

Field parameters offer a better way to achieve this. Instead of using a SWITCH measure, simply add each measure to a field parameter. These measures will be available in a slicer, and the formatting of each measure will be used in visuals.

 

https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.