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.
Good day all,
I can't wrap my head around the following issue. I've created a rolling 30 day measure. When visualing in a graph, values are shown for future months (when I use the date hierarchy). Obviously, I don't want these to be shown. How can I solve this? Your help is highly appreciated!
Final measure:
Rolling 30 days correct = IF(MAX(Dates[Date]) <= TODAY(),([Rolling30Days]), BLANK())
Created by following measures:
Rolling30Days = 1 - ([Rolling30Delay]/[Rolling30Voyages])
Rolling30Voyages =
CALCULATE (
SUM ( VoyagesInPeriod[Duration] ),
FILTER (
ALLSELECTED ( 'Dates' ),
'Dates'[Date] <= MAX ( 'Dates'[Date] )
&& 'Dates'[Date]
> MAX ( 'Dates'[Date] ) - 30
)
)
Rolling30Delay =
IF (
ISBLANK ( CALCULATE ( SUM ( DelaysInPeriod[Duration] ) ) ),
BLANK (),
CALCULATE (
SUM ( DelaysInPeriod[Duration] ),
FILTER (
ALLSELECTED ( 'Dates' ),
'Dates'[Date] <= MAX ( 'Dates'[Date] )
&& 'Dates'[Date]
> MAX ( 'Dates'[Date] ) - 30
)
)
)
Thanks a bunch,
Sifra
Hi swestendorp,
You said "Obviously, I don't want these to be shown. How can I solve this? Your help is highly appreciated!"
<--- Which column is used as X-axis in your chart? Could you give some more details about your table structure and expected requirement? And if possible, can you provide a pbix file with dummy data for further analysis?
Regards,
Jimmy Tao
Hi @v-yuta-msft,
Thanks for your reply. In the meantime, we have found out that it has something to do with the last step, that is the '1 - ...'. This is causing Power BI to calculate for future months. I don't know however to solve this.
On the X-axis I have used my date table:
Dates =
CALENDAR ( DATE ( ( 2013 ), ( 01 ), ( 01 ) ), TODAY () )
My data model looks like this:
Thanks for your help.
Best regards,
Sifra
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |