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
Danch89
Frequent Visitor

Turn Monthly Budget into Cumulative Daily Graph

I have a table with sales budgets with a starting date for the month ahead along with a total budget for the whole month. I'd like to show a line graph with days of month showing this budget as a daily cumulative total.

 

For Example

DateBudget
1st Jan 2250,000
1st Feb 2280,000
1st Mar 22125,000
1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @Danch89 ,

 

The key is to have a date dimension and have a year offset to filter out only the years you’re interested in showing.

Try the following formula:

Year Offset = YEAR(TODAY())-‘Date'[Year]
Rolling 12 Months Sales =
CALCULATE (
    SUM ( 'Sales Fact'[Revenue] ),
    DATESBETWEEN (
        'Date'[Date],
        NEXTDAY ( SAMEPERIODLASTYEAR ( LASTDATE ( 'Date'[Date] ) ) ),
        LASTDATE ( 'Date'[Date] )
    )
)


If the problem is still not resolved, please point it out. Looking forward to your reply.


Best Regards,
Henry


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

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @Danch89 ,

 

The key is to have a date dimension and have a year offset to filter out only the years you’re interested in showing.

Try the following formula:

Year Offset = YEAR(TODAY())-‘Date'[Year]
Rolling 12 Months Sales =
CALCULATE (
    SUM ( 'Sales Fact'[Revenue] ),
    DATESBETWEEN (
        'Date'[Date],
        NEXTDAY ( SAMEPERIODLASTYEAR ( LASTDATE ( 'Date'[Date] ) ) ),
        LASTDATE ( 'Date'[Date] )
    )
)


If the problem is still not resolved, please point it out. Looking forward to your reply.


Best Regards,
Henry


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

amitchandak
Super User
Super User

@Danch89 , I think my blog on this topic can help

Distributing/Allocating the Monthly Target(Convert to Daily Target): Measure ( Daily/MTD): https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Monthly-Target-...

Thanks - I've got the daily target but I still don't know how to change this into a rolling month. For example below. I'd want to cumulative total that daily target each day for the month to show a month trend against target.

 

Danch89_0-1648027350051.png

 

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.