cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Danny7
Regular Visitor

Filter Table Data based on Slicer or Condition

Hello all,

 

I have created and attached a replication of a desired Report and have the following Problem: I have a Dataset that I want to filter based on the Combination of the Fields t_apac, t_cmod, t_cses and session_desc, but it is not always filled and it can't be filtered with a default Slicer. E.G. of Testdata

Danny7_0-1670400472315.png

 

The Report looks like this:

 

Danny7_1-1670400630421.png

The Idea is that the User filters primarily with the Slicer on the top right. So let's say we filter on "abcde1234m000 - Maintain cde" it shows following Data:

Danny7_2-1670400701091.png

The Problem with this is it only shows the fields where t_cses is filled but the Goal is that it also shows Data where t_cses is not filled but t_cpac and t_cmod are the same as the filtered Combo Field and Session is empty / "No Session". So it should show this Data:

Danny7_3-1670400827031.png

You can currently accomplish this by selecting the options above in the Slicers which requires interactions with multiple Slicers and Field, which is not very user-friendly and can lead to confusion and wrong data presentation. 

 

The Question is: How can I make the Report work like this:

User selects the Session in the top right filter and it automatically sets the filters like above and shows Data that fulfills the following Conditions:

Data contains the selected Session 

OR

Data contains the same t_cpac and t_cmod like the selected Session in Slicer (e.g.  "abcde1234m000 - Maintain cde" --> "abcde") and it's not a different Session (has to be empty or "No Session")

 

I have tried to find Solutions but unfortunately haven't found anything that applies to my Scenario.

 

Ideally it should also not show the yellow marked row if filtered and there is already a row for that User with the Session and t_pind is 2, since it means the User has no Access to the Session. 

Danny7_4-1670401799148.png

 

Since I cannot attach the .pbix File, here's the uploaded Version: https://ufile.io/9kg4a3g2 

 

Thanks for the help in advance, please let me know if there are any Questions to this.

 

 

1 ACCEPTED SOLUTION

Start small. Create a separate table with the FullSessionName values  and use that for a disconnected slicer.

 

Then create a measure that implements your logic.  Use that measure as a visual filter for your table visual.

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

By default Power BI filters across columns are always applied as AND  (within a column they are applied as OR).  If you want to change that behavior you must implement your own measures across disconnected tables and you must educate your users because the behavior will be unexpected for them.

Thanks for the input. I have tried with measures and disconnected tables before but could not make it work.

I had Split the tables into a Module Table and a Session Table and tried to use the measure based on the selected Values in the Slicer

 

Can you please explain/preview how I would manage to do this via measures and disconnected tables? 

 

Thanks and Best Regards

Start small. Create a separate table with the FullSessionName values  and use that for a disconnected slicer.

 

Then create a measure that implements your logic.  Use that measure as a visual filter for your table visual.

Thanks. I made it work to always show the Values with "No Session" when it's filtered to a specific Session.

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.