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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
ignas
Advocate II
Advocate II

Display the last 12 months data based on Slicer selection

 

Hello

I have one simple issue. Based on selected month in Slicer I need to have the last 12 months displayed in the graph:

Capture.JPG

I need both Year and Date Slicer. If I select Date Slicer then I get only that month data. How could I display the last 12 months?

 

Here is the dashboard:
https://mega.nz/#!uzglxJQa!cqyaSpTT6dINqn65MP-oolW2jjRDNs15AAAAAAAAAAA

 

Regards,

Ignas

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

You will need a disconnected Date table for your slicer so that it does not impact your visual. You would then grab the MAX of that and then you could build a measure for your visual that only returns a value if it is within the last twelve months based upon that MAX.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

This is exactly what I am looking for but I am not certain I understand your solution. Could you unpack that a little?

I have a Date table.

Are we saying I should have a second separate date tabel that doesn't have a relationship with the fact table? 

How would I grab the MAX of that? Do you mean a measure that's something like:

MaxDate = MAX(Datetable[Date])

What would that measure look like that only returns a value if it is within the last twelve months based on the MAX?

 

Thank you!

 

Best regards,

~Don

DebbieE
Community Champion
Community Champion

Im really struggling with this at the moment and need to apply this a a fair few visuals. Surely there is a simpler way of doing this?  Im struggling to understand both of these solutions.

 

Currently All I can do is crete a rolling 12 months based on the current date and go from there but the fact its not attached to the filter is not great.

 

Im using a hierarchy slicer so I drill down 2019 March and I want my visul to show This month and the last 12. I already have a column in my date dim with 'Mar 2019' 'Feb 2019' etc that I thought I could use in the visual

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors