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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
wpf_
Post Prodigy
Post Prodigy

How to use two date slicers on different table visuals?

I need to build a report where it compares the same month from different years and the third table shows the percent change.  All data is from the same table.  so for example:

 

DateABCTotal
4/1/20194565678779
4/2/201936251475
4/3/2019748596255
    1109
     
     
DateABCTotal
4/1/2020548536175
4/2/2020454337125
4/3/2020819237210
    510
     
     
DateABCTotal
Wed10%8.50%6.30%7.90%
Thurs5.20%4.10%9.60%6.30%
Fri5.80%2.90%1.80%3.90%
    5.10%

 

I tried using two seperate slicers with each one filtering a different table visual.  But that doesn't seem to work, it comes up blank.  I guess it's doing an AND operation on the same data set.  Is there any way to do this in BI without creating another table?  And how would i create the percent change table with the percent change values?  Thanks. 

 

 

 

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@wpf_ As a best practice, add date dimension in your model and use it for and time intelligence calculations. Once the date dimension is added, mark it as a date table on table tools.

https://perytus.com/2020/05/22/create-a-basic-date-table-in-your-data-model-for-time-intelligence-ca...

 

and from this new date table, you can easily get a previous year sum for the same month and then calculate the %, add following measure

 

Current = SUM ( Table[Value] )

Prev = CALCULATE ( [Current], DATEADD( DateTable[Date], -1, YEAR ) )

% Diff = DIVIDE ( [Current] - [Prev], [Prev] ) 

 

Not sure if you data exactly looks like the way you showed, if yes, then you need to unpivot your data

 

- transform data
- select date column 
- right-click, unpivot other columns it will add two columns, attribute, and value, rename these as per your requirement
- close and apply

- set relationship date from the transaction table with the date table added earlier.
To visualize,
- matrix visual:
- add date from date table on rows,
- add attribute on columns
- add above measure on values


 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@wpf_ As a best practice, add date dimension in your model and use it for and time intelligence calculations. Once the date dimension is added, mark it as a date table on table tools.

https://perytus.com/2020/05/22/create-a-basic-date-table-in-your-data-model-for-time-intelligence-ca...

 

and from this new date table, you can easily get a previous year sum for the same month and then calculate the %, add following measure

 

Current = SUM ( Table[Value] )

Prev = CALCULATE ( [Current], DATEADD( DateTable[Date], -1, YEAR ) )

% Diff = DIVIDE ( [Current] - [Prev], [Prev] ) 

 

Not sure if you data exactly looks like the way you showed, if yes, then you need to unpivot your data

 

- transform data
- select date column 
- right-click, unpivot other columns it will add two columns, attribute, and value, rename these as per your requirement
- close and apply

- set relationship date from the transaction table with the date table added earlier.
To visualize,
- matrix visual:
- add date from date table on rows,
- add attribute on columns
- add above measure on values


 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k ,

 

Thanks very much, i just tried the prev measure and it worked!

Just one issue though.  What if i wanted not to go just one year previous in exact calendar date (4/1/2020 to 4/1/2019), but wanted to go one year previous to that same first weekday of that month  ( Wednesday 4/1/2020 to Wednesday 4/3/2019) ?  Thanks. 

@parry2k ,

 

i was able to get to the previous year to the first day of that month using DAY intervals in DATEADD function (minus or plus a few days).  I will look into using a variable for the interval days and use a slicer to change the variable.  If you have a better solution please let me know. Thanks. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors