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
iamriz
Helper II
Helper II

How to filter 3 Matrix tables with one date sync slicer - 2 tables reflecting past 2 months?

Hello, I am having a hard time figuring out how to have a single date sync slicer that would filter 3 Matrix tables - 2 of which reflecting past 2 months?

 

How to retain the 3rd date sync slicer that would achieve the table 1 and 2 count values?

 

I hope someone could help. Thanks in advance.

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

Hi, @iamriz 

According to your description and sample file, I guess you want to make a Slicer filter three tables(current, 1 month ago, 2 month ago), you can try my steps:

  1. Create a Calendar table for Slicer:
Date = CALENDARAUTO()
  1. Create these measures for Table1, Table2, Table3:
Count_Table1 =

var _selecteddate=MIN('Date'[Date])

return

CALCULATE(COUNT(Orders[OrderID]),

FILTER('Orders',

[Datetime]>=DATE(YEAR(_selecteddate),MONTH(_selecteddate)-1,DAY(_selecteddate))&&

[Datetime]<_selecteddate))
Count_Table2 =

var _selecteddate=MIN('Date'[Date])

return

CALCULATE(COUNT(Orders[OrderID]),

FILTER('Orders',

[Datetime]>=DATE(YEAR(_selecteddate),MONTH(_selecteddate)-2,DAY(_selecteddate))&&

[Datetime]<DATE(YEAR(_selecteddate),MONTH(_selecteddate)-1,DAY(_selecteddate))))
Count_Table3 =

CALCULATE(COUNT(Orders[OrderID]),FILTER('Orders','Orders'[Datetime]>=MIN('Date'[Date])&&'Orders'[Datetime]<=MAX('Date'[Date])))

 

  1. Replace the field of Slicer with ‘Date’[Date], replace [Count] in Tables with new measures, then open visual interactions, like this:

v-robertq-msft_0-1606293501115.png

 

And you can get what you want.

You can download my test pbix file here

 

Best Regards,

Community Support Team _Robert Qin

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

Hi, @iamriz 

According to your description and sample file, I guess you want to make a Slicer filter three tables(current, 1 month ago, 2 month ago), you can try my steps:

  1. Create a Calendar table for Slicer:
Date = CALENDARAUTO()
  1. Create these measures for Table1, Table2, Table3:
Count_Table1 =

var _selecteddate=MIN('Date'[Date])

return

CALCULATE(COUNT(Orders[OrderID]),

FILTER('Orders',

[Datetime]>=DATE(YEAR(_selecteddate),MONTH(_selecteddate)-1,DAY(_selecteddate))&&

[Datetime]<_selecteddate))
Count_Table2 =

var _selecteddate=MIN('Date'[Date])

return

CALCULATE(COUNT(Orders[OrderID]),

FILTER('Orders',

[Datetime]>=DATE(YEAR(_selecteddate),MONTH(_selecteddate)-2,DAY(_selecteddate))&&

[Datetime]<DATE(YEAR(_selecteddate),MONTH(_selecteddate)-1,DAY(_selecteddate))))
Count_Table3 =

CALCULATE(COUNT(Orders[OrderID]),FILTER('Orders','Orders'[Datetime]>=MIN('Date'[Date])&&'Orders'[Datetime]<=MAX('Date'[Date])))

 

  1. Replace the field of Slicer with ‘Date’[Date], replace [Count] in Tables with new measures, then open visual interactions, like this:

v-robertq-msft_0-1606293501115.png

 

And you can get what you want.

You can download my test pbix file here

 

Best Regards,

Community Support Team _Robert Qin

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

Hi @v-robertq-msft , just what I was looking for. This is very helpful, thank you very much!!!

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.