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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
AsNa_92
Resolver I
Resolver I

How to filter a table based on 3 slicers?

Hi guys,

 

I have a case where customer wants to show a table with specific dates based on slicer.

For eaxmple I have so many dates and the table should show only three dates as below:

AsNa_92_0-1717401900784.png

How can I apply that in PowerBI Desktop?

 

1 ACCEPTED SOLUTION

Hi @AsNa_92 ,

 

I'm talking about having 3 additional tables on your model that will allow to force the filtering that you need.

The measure is the following:

Filter values = 
    COUNTROWS(
         FILTER('Table',
           'Table'[Date] in VALUES(FilterDate1[Date]) ||
           'Table'[Date] in VALUES(FilterDate2[Date]) ||
           'Table'[Date] in VALUES(FilterDate3[Date]) 
                )
              )

MFelix_0-1717492149994.png

Add your measure has filter of your visualization making the filter is not blank

MFelix_1-1717492355576.png

Please see file attach. Don't mind the data and the formats because is just an example.

 

 

 

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

6 REPLIES 6
MFelix
Super User
Super User

Hi @AsNa_92 


For this you need to have 3 different disconnect tables to make your slicer selection and then add a measure that will allow you to filter the results should be something similar to:

 

Filter values =
CALCULATE(
    COUNTROWS(Table),
    Table[Date] in VALUES(FilterDate1[Date]) ||
    Table[Date] in VALUES(FilterDate2[Date]) ||
    Table[Date] in VALUES(FilterDate3[Date]) 
)

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @MFelix 

But if I created separate tables then I don;t need to create measue. 

I can easily edit interaction and select none.

 

Is there a way to make it in one table? 

like with condition of where date equal to slicer1, slicer2 and slicer3 ?

Hi @AsNa_92 ,

 

The tables need to be created in a disconnected manner, meaning that they don't have any relationship with your main table, then you need to create the measure to get the correct filter context to be applied on your main data. Without any measure the tables won't get picked up to your filter context.

 

The tables need to be disconnected otherwise when you do the filter by one of the tables the result will get blank out on the other 2 tables.

 

The measure I present does that filtering using the OR  - ||  condition and picking up the values you need.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @MFelix 

I'm still confused by 3 tables.. do you mean as a visual or table source? 

If so, could you give some example and where do I place the measure?

Hi @AsNa_92 ,

 

I'm talking about having 3 additional tables on your model that will allow to force the filtering that you need.

The measure is the following:

Filter values = 
    COUNTROWS(
         FILTER('Table',
           'Table'[Date] in VALUES(FilterDate1[Date]) ||
           'Table'[Date] in VALUES(FilterDate2[Date]) ||
           'Table'[Date] in VALUES(FilterDate3[Date]) 
                )
              )

MFelix_0-1717492149994.png

Add your measure has filter of your visualization making the filter is not blank

MFelix_1-1717492355576.png

Please see file attach. Don't mind the data and the formats because is just an example.

 

 

 

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



@MFelix 

Thank you so much! it works perfectly 😁

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

October NL Carousel

Fabric Community Update - October 2024

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