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

Slicer filter another slicer

Power BI Set up;

- 1 Table

- Slicer 1 (Between) for column A (Values)

- Slicer 2 (Between) for column B (Date)

 

Goal:

[Count values filtered by slicer 1 and slicer 2] divided by [Count Values filtered only by slicer 2]

 

I have tried filters ALL, ALLSELECT and ALL EXCEPT.

I can filter with slicer 1 from 0 to 10, but it doesn't work with slicer 1 from 3 to 10.

 

Thanks for your effort!

 

Boudewijn

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

Hi @Boudewijn

in my test, 

[Count values filtered by slicer 1 and slicer 2] ---Measure

divided by

[Count Values filtered only by slicer 2]    ---------Measure 2

 

Best Regards

Maggie

 

View solution in original post

6 REPLIES 6
v-juanli-msft
Community Support
Community Support

Hi @Boudewijn

in my test, 

[Count values filtered by slicer 1 and slicer 2] ---Measure

divided by

[Count Values filtered only by slicer 2]    ---------Measure 2

 

Best Regards

Maggie

 

Maggie, I'm really impressed, brilliant!! It is just what the doctor ordered! Thanks for your efforts!

Maggie, I'm really impressed, brilliant!! It is just what the doctor ordered! Thanks for your efforts!

v-juanli-msft
Community Support
Community Support

Hi @Boudewijn

Create a date table 

New table-> enter the following formula

Table = CALENDARAUTO()

leave no relationship between this date table and your table

4.png

 

Create measures

MIN = MIN('Table'[Date])

Max = MAX('Table'[Date])

Measure =
CALCULATE (
    COUNT ( Sheet3[index] ),
    FILTER ( ALLSELECTED ( Sheet3 ), [columnB] >= [MIN] && [columnB] <= [Max] )
)

Measure 2 =
CALCULATE (
    COUNT ( Sheet3[index] ),
    FILTER ( ALL ( Sheet3 ), [columnB] <= [Max] && [columnB] >= [MIN] )
)

3.png

 

Best Regards

Maggie

 

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

Boudewijn
Frequent Visitor

I found the problem;

 

If the slicer 2 (between) for column B (date) is formatted as date (1-1-2018  / 31-12-2018), it will not work.

 

If the slicer 2 (between) for column B (date) is formatted as decimal (2018 / 2018), it work's.

 

What to do if I want to filter on date format???

CheenuSing
Community Champion
Community Champion

Hi @Boudewijn

 

Please post or share some sample data and the output expected to arrive at a solution.

 

 

Cheers

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

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.

Top Solution Authors