Forum Discussion
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
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
- Anonymous7 years ago
i found a simple soulution.
I just used a calculate and then remove the slider filter usering a 'all' function
3 Replies
- v-yuta-msftCommunity 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
- AnonymousNot applicable
Hi Anonymous
Check out this
You may find a solution in this.
Cheers
CheenuSing
- AnonymousNot applicable
i found a simple soulution.
I just used a calculate and then remove the slider filter usering a 'all' function