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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
MennoHoogeveen
New Member

Slicer filter matrix showing YTD on blank measure

I have a matrix showing a YTD measure. A single select slicer to select the date until which the matrix should so data. 
Now the user wants a TRUE/FALSE kind of slicer to be able to show only rows in which the current data has data (so NOT(ISBLANK([Measure])) ). I am able to do this directly on the matrix by adding a filter on field (measure) [Measure] with "is not blank". However, I have no idea how to accomplish this so the user is able to toggle it themselve.

 MatricesMatricesFieldsFields

 

Link to a .pbix example:

WeTransfer 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @MennoHoogeveen ,

 

Here are the steps you can follow:

1. Enter Data – create a table.

vyangliumsft_0-1694172834361.png

2. Create measure.

Flag =
var _select=SELECTEDVALUE('Slicer_Tabel'[Flag])
return
IF(
    _select="Flase"&&[Measure]=BLANK(),0,1)Flag =
var _select=SELECTEDVALUE('Slicer_Tabel'[Flag])
return
IF(
    _select="Flase"&&[Measure]=BLANK(),0,1)

3. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1694172834362.png

4. Result:

Select True:

vyangliumsft_2-1694172924003.png

Select Flase:

vyangliumsft_3-1694172924005.png

 

 

Best Regards,

Liu Yang

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-yangliu-msft
Community Support
Community Support

Hi  @MennoHoogeveen ,

 

Here are the steps you can follow:

1. Enter Data – create a table.

vyangliumsft_0-1694172834361.png

2. Create measure.

Flag =
var _select=SELECTEDVALUE('Slicer_Tabel'[Flag])
return
IF(
    _select="Flase"&&[Measure]=BLANK(),0,1)Flag =
var _select=SELECTEDVALUE('Slicer_Tabel'[Flag])
return
IF(
    _select="Flase"&&[Measure]=BLANK(),0,1)

3. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1694172834362.png

4. Result:

Select True:

vyangliumsft_2-1694172924003.png

Select Flase:

vyangliumsft_3-1694172924005.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Worked perfectly, thank you!

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors