cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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?

 

Please see attached Sample Data pbix file. 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
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
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

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

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors