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
Narukkp
Helper V
Helper V

Calculate Measures in Slicer with default values

Hi Team,

Can we use the measure value in Slicer with default values. Below is the my scenario

 

Measure Val =IF(Measure1+meausre2+measure3=3,1,0)

Measure String=IF(Measure Val=1,”YES”,”NO”)

Below is the existing Report

                                                                                                                                                                                                         

Name

Meaure1

Measure2

Measure3

Measure Val

Measure String

A

1

0

1

0

NO

B

1

1

1

1

YES

C

1

1

1

1

YES

 

Required Output is Default loading should be YES values but when the user is select the No in slicer then we need to display NO values.

 

Could you please let me know how to add above Measure String measure in Slicer with “Yes” default values.

2 ACCEPTED SOLUTIONS
v-frfei-msft
Community Support
Community Support

Hi @Narukkp ,

 

As we know, we cannot add a measure to a slicer. Here we can add the measure to the visual level filter to make the measure is YSE to get the filtered visual.

 

Capture.PNG

 

Regards,

Frank

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

View solution in original post

Nishantjain
Continued Contributor
Continued Contributor

@Narukkp 


You can use ISFILTETED function to find out is a field has filters applied to it. You can then use the default value if it is not filtered

 

Measure Val with Default =
IF (
    ISFILTERED ( [Measure String] ),
    IF ( Measure1 + meausre2 + measure3 = 3, 1, 0 ),
    CALCULATE (
        IF ( Measure1 + meausre2 + measure3 = 3, 1, 0 ),
        [Measure String] = "YES"
    )
)

 

 

View solution in original post

5 REPLIES 5
Nishantjain
Continued Contributor
Continued Contributor

@Narukkp 


You can use ISFILTETED function to find out is a field has filters applied to it. You can then use the default value if it is not filtered

 

Measure Val with Default =
IF (
    ISFILTERED ( [Measure String] ),
    IF ( Measure1 + meausre2 + measure3 = 3, 1, 0 ),
    CALCULATE (
        IF ( Measure1 + meausre2 + measure3 = 3, 1, 0 ),
        [Measure String] = "YES"
    )
)

 

 

v-frfei-msft
Community Support
Community Support

Hi @Narukkp ,

 

As we know, we cannot add a measure to a slicer. Here we can add the measure to the visual level filter to make the measure is YSE to get the filtered visual.

 

Capture.PNG

 

Regards,

Frank

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

Hi ,

If you add the page level or visuvlization level filter then end user may not be able to select the NO in slicer. This is not i am expecting

Hi @Narukkp ,

 

Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Narukkp
Helper V
Helper V

Hi Team,

Does any one having any idea please help on this. 

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.