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
DianaT
Helper I
Helper I

How to translate daily revenue total into yearly cumulative total?

Hi all,

 

I'm trying to do a revenue forcast using a dataset that contains the following columns: 

 

Client ID   Program enroll      Start date         End date      Instalment amt    Instalment frequency    Daily revenue (calculated based on instalment amt and frequency

 

And a date table generated from Calendarauto

 

And below is a measure I used to calculate the daily total from 2021 onward

 

Daily revenue total =

CALCULATE(SUM('AF DESIGNATION FORECAST'[Daily revenue]),
FILTER(VALUES('AF DESIGNATION FORECAST'[Start date]),'AF DESIGNATION FORECAST'[Start date] <= MAX ('Date'[Date])),
FILTER(VALUES('AF DESIGNATION FORECAST'[ End date]),'AF DESIGNATION FORECAST'[End date] >= MIN ('Date'[Date])))
 
And I manage to get results like this
DianaT_1-1627510533463.png

 

However, as I try to get the culumulative total of each year (say 2021), this measure doesn't seem to work with it... What has gone wrong?

 

Any help will be greatly appreciated. Thank you.

 

Diana

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @DianaT ,

 

Try the following formula:

 

Measure = 
CALCULATE(
    SUM('AF DESIGNATION FORECAST'[Daily revenue]),
    FILTER(
        'AF DESIGNATION FORECAST',
        'AF DESIGNATION FORECAST'[End date] < MAX('Date'[Date])
        && YEAR('AF DESIGNATION FORECAST'[End date]) = MIN('Date'[Year])
    )
) + [Daily revenue total]

 image.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-kkf-msft
Community Support
Community Support

Hi @DianaT ,

 

Try the following formula:

 

Measure = 
CALCULATE(
    SUM('AF DESIGNATION FORECAST'[Daily revenue]),
    FILTER(
        'AF DESIGNATION FORECAST',
        'AF DESIGNATION FORECAST'[End date] < MAX('Date'[Date])
        && YEAR('AF DESIGNATION FORECAST'[End date]) = MIN('Date'[Year])
    )
) + [Daily revenue total]

 image.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.