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
Anonymous
Not applicable

Trailing 12 months from specific date interval

Hi Experts!

 

I need help creating a Measure that is calculating the sum of the last 12 months 'sales'. The problem is that in the same Matrix there is a measure that is showing the sum of sales bassed on a slicer. 

 

So i need the measure to take the Max date from the slicer but the measure need to go eaerliere then the slicer. so no matter the range of my slicer, the Measure is allways going to show the last 12 months from the max date from the slicer.

 

 

This is what i need the end product to look like

Unavngivet.png

The following picture shows that the 'Sales' is the total sales for November but the 'Last 12 months' still shows the total sales for the last 12 months from the max date of the filter.

So the numbers would be:

Sales: Total sales November 2018

last 12 months: Total sales from November 2017 - November 2018

 

 

The data model is build as followed 

Fact_Sales

Dim_Date

Dim_Product

 

As much as i know i need to create another Date dimention and have it disconnected from the rest of the datamodel but i can't figure out how i have to create the measure

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

i found a simple soulution.

I just used a calculate and then remove the slider filter usering a 'all' function

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

i found a simple soulution.

I just used a calculate and then remove the slider filter usering a 'all' function

CheenuSing
Community Champion
Community Champion

Hi @Anonymous 

 

Check out this

 

https://community.powerbi.com/t5/Desktop/Show-last-13-months-based-on-user-single-slicer-selection/td-p/64214

 

You may find a solution in this.

 

Cheers

 

CheenuSing

 

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

This issue should be related to the "Last 12 Month" measure as your mentioned. Have you use some dax function like selectedvalue() or allselected() to interact with the slicer below? If possible, could you share the dax function?

 

Regards,

Jimmy Tao

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.