Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Today, I have a separate Date table and a Sales table.
This time I was creating a rolling average with a quick measure, using the Sales amount field in the sales table and the primary Date field on the date table.
The problem is when I am trying to filter the year using a slicer, the rolling average graph is showing 12 month forward. This makes sense since it got data from 12 months back. But how do I stop it from showing dates 12m forward?
I can't figure this one out.
Instead of pasting the examples in here, I have shared a simple Power BI file in the link below.
The screenshow shows the problem:
Solved! Go to Solution.
You may try adding IF.
RETURN IF ( YEAR ( __LAST_DATE ) IN ALLSELECTED ( 'Calendar'[Year] ),
You may try adding IF.
RETURN IF ( YEAR ( __LAST_DATE ) IN ALLSELECTED ( 'Calendar'[Year] ),
Thanks!
Really saved my day, and week, and year!
How can I do that in my case as shown below?
I don't need the future dates (oct to dec 2020):
My DAX for the one measure used in this axis:
Thanks in advance.
Marcos
User | Count |
---|---|
106 | |
86 | |
81 | |
74 | |
71 |
User | Count |
---|---|
112 | |
101 | |
96 | |
74 | |
67 |