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, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Pradeep_T
New Member

Dynamically Filtering 2nd slicer based on 1st slicer and show before and after values.

Hi ,
Please help me with a workaround or a logic to show values in a slicer based on the selection of a value in a different slicer.
Example: I have two tables "Start_Quarter" and "End_Quarter". Both are having same values starting from 2020-Q1, 2020-Q2.......to 2023-Q1.
I have 2 slicers added in the report and would like to select a value in the 1st slicer 'Start_Quarter' and the 2nd slicer 'End_Quarter' should give values after/greater than selected value.

Example: Selecting 2021-Q1 in 'Start_Quarter', we should plot values after 2021-Q1 in 'Ending_Quarter' slicer and this should be dynamic based on selection of any other values.

Example 1: Pradeep_T_0-1680678440241.png            Example 2:  Pradeep_T_1-1680679112795.png


I have not created a relationship between these two tables and they are derived from the Calendar table. I am currently using the slicer values(Selected Value) to calculate sum/counts based on the selections. And a chunk of the logic used below in our reporting

var Q1 = MAX(Start_Quarter[Quarter])
var Q2 = MAX(End_Quarter[Quarter])
var A1 = CALCULATE( [Sales], 'Table A'[Quarter A] > Q1 && 'Table A'[Quarter A] <= Q2)

Thanks for all your help.
2 REPLIES 2
joaoribeiro
Impactful Individual
Impactful Individual

Hi @Pradeep_T ,

 

The filters are not changing each other because there is no relationship between then. As you cannot use a measures as slice, I suggest you consider creating a bridge table with unique values to relate both tables and enable this dynamic filtering (this way you avoid many-to-many relationships).

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️or giving it a kudoe 👍

Thanks!
Best regards,
Joao Ribeiro

@joaoribeiro Thank you for looking into it.
Yeah! I have tried adding the relationship before, it did not work as it was expected.
Below is the model used. I try to get the selected value from start/end quarter from the slicer and then pass the value to the data table to fetch records.

The reason why relationship was not created is  it will narrow down to one value instead of a list of values.
I understand that we cannot filter another slicer based on the selection of one slicer without a relationship.
I am looking for a way to solve this to show values in End_Quarter Slicer (AFTER/GREATER THAN) based on a selection of a value in Start_Quarter slicer.

Pradeep_T_0-1680707151264.png

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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.