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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
sarikei
Helper I
Helper I

Previous Year

I have a slicer (Slicer A) display text of the date. i.e. Current Month, Current Year, Current Quarter.

Then I have the other slicer (Slicer B) display the actual date of it. example, if Slicer A is Current Month, then Slicer B will be Date From 01-02-2023 Date To 28-02-2023. If Slicer A is Current Year, then Slicer B is Date from 01-01-2023 Date To 01-12-2023.

All working fine, I have these 2 tables joined together in the data model.

Now, what I need to is to display the current and previous year Sales Revenue.

I can display the Current Year Sales Revenue. No problem, but I can’t display the Previous Year Sales Revenue.

The Previous Year Sales Revenue is a measure, using the following fomular:

 

Previous Year Sales Revenue = CALCULATE([# SalesRev], DATEADD(DateTable[Date],-1,YEAR)

 

The DateTable[Date] is what use to display the Slicer B. But this formular doesn’t look working.

Why? How can I display the value of this “DATEADD(DateTable[Date],-1,YEAR)” so I can analyse what is actually the value of it?

 

Please help.

2 REPLIES 2
amitchandak
Super User
Super User

@sarikei , the measures seems fine

Previous Year Sales Revenue = CALCULATE([# SalesRev], DATEADD(DateTable[Date],-1,YEAR))

 

DateTable should have all the required date

Join should be single directional

DateTable should be marked as date table

 

Slicer, visual should use DateTable for periods 

 

Why Time Intelligence Fails - Powerbi 6 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

yes, everything looks fine but the measure didn't work.

the measure work only if I manually update the date in the Slicer B. Example, if I change the date manually as 01-12-2022 to 31-12-2022, then the previous year revenu will be calculated using 01-12-2021 to 31-12-2021, which is correct.

What I miss? Why the measure not calculating unless I update the date manually on Slicer B?

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.