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 afternoon,
I have a YTD that isn't working correctly. If a forecast value is not available, then it should return the actual revenue value. The picture below shows that works well. However, I'm trying to get the forecast YTD value to aggregate correctly. Instead, the forecast YTD is cumulating the revenue (Jan - Mar) & then resets & then cumulates the forecast value for the remainder of the year.
I've tried various YTD measures & "if blank" logic, but to no avail.
Incorrect Measure(s):
Forecast :=CALCULATE(IF(ISBLANK([Monthly Revenue]),[Monthly Forecast],[Monthly Revenue]))
YTD Forecast :=CALCULATE([Forecast],DATESYTD(dimDate'[Date]))
Any thoughts? Tips? Suggestions?
Kindly - James
Solved! Go to Solution.
Hi @Jkaelin,
I made one sample for your reference. Creating the measures as below.
Monthly Forecast = SUM(Table1[Forecast])
Monthly Revenue = SUM(Table1[Revenue])
Forecast M = IF(ISBLANK([Monthly Revenue]),[Monthly Forecast],[Monthly Revenue])
Measure = VAR a = TOTALYTD ( [Monthly Revenue], dimDate[Date] ) VAR b = TOTALYTD ( CALCULATE ( [Monthly Forecast], FILTER ( Table1, [Monthly Revenue] = BLANK () ) ), dimDate[Date] ) RETURN IF ( ISBLANK ( [Monthly Revenue] ), a + b, a )
Also attached the pbix for your reference. If it doesn't meet your requirement, kindly share your sample data and excepted result to me.
Regards,
Frank
Hi @Jkaelin,
I made one sample for your reference. Creating the measures as below.
Monthly Forecast = SUM(Table1[Forecast])
Monthly Revenue = SUM(Table1[Revenue])
Forecast M = IF(ISBLANK([Monthly Revenue]),[Monthly Forecast],[Monthly Revenue])
Measure = VAR a = TOTALYTD ( [Monthly Revenue], dimDate[Date] ) VAR b = TOTALYTD ( CALCULATE ( [Monthly Forecast], FILTER ( Table1, [Monthly Revenue] = BLANK () ) ), dimDate[Date] ) RETURN IF ( ISBLANK ( [Monthly Revenue] ), a + b, a )
Also attached the pbix for your reference. If it doesn't meet your requirement, kindly share your sample data and excepted result to me.
Regards,
Frank
Hi @v-frfei-msft,
i tried testing the same and i am able to recreate what james was talking about.
i also checked your file "Dates YTD not working.pbix" file and is working good.Not sure if am missing something in here.
Please find the test file which i created in the below link :
My file see YTD Measure :
YTD Measure = CALCULATE([Measure],DATESYTD('Calendar'[Date]))
Regards
CLR
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 |
---|---|
112 | |
100 | |
76 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |