cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bbsin
New Member

Can advise how to show the total budget vs spending by month and quarter and yearly?

hi

 

the budget cost I have is in this table format,

May I know how to show in the dashboard 

by it's sub cat and detail breakdown to

1) Qtr total Budget vs total spending

2) Monthly - 

3) yearly as it will few yeards

 

bbsin_0-1659074452705.png

 

not sure how to link into the date as the budget dates are in SUM?  Thanks

 

bbsin_1-1659074573248.png

 

 

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

Hi @bbsin ,

 

Please try following the steps.

1# Unpivot the yearmonth columns.

2# Create Year, Quarter and Month Columns.

3# Create measures like below:

Qtr =
DIVIDE (
    CALCULATE (
        SUM ( [value] ),
        ALLEXCEPT ( 'table', [category], [subcategory], [Year], [Quarter] )
    ),
    CALCULATE (
        MAX ( [total] ),
        ALLEXCEPT ( 'table', [category], [subcategory], [Year] )
    )
)

Monthly =
DIVIDE (
    CALCULATE (
        SUM ( [value] ),
        ALLEXCEPT ( 'table', [category], [subcategory], [Year], [Month] )
    ),
    CALCULATE (
        MAX ( [total] ),
        ALLEXCEPT ( 'table', [category], [subcategory], [Year] )
    )
)

Yearly = 
DIVIDE (
    CALCULATE (
        SUM ( [value] ),
        ALLEXCEPT ( 'table', [category], [subcategory], [Year] )
    ),
    CALCULATE (
        MAX ( [total] ),
        ALLEXCEPT ( 'table', [category], [subcategory] )
    )
)

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @bbsin ,

 

Please try following the steps.

1# Unpivot the yearmonth columns.

2# Create Year, Quarter and Month Columns.

3# Create measures like below:

Qtr =
DIVIDE (
    CALCULATE (
        SUM ( [value] ),
        ALLEXCEPT ( 'table', [category], [subcategory], [Year], [Quarter] )
    ),
    CALCULATE (
        MAX ( [total] ),
        ALLEXCEPT ( 'table', [category], [subcategory], [Year] )
    )
)

Monthly =
DIVIDE (
    CALCULATE (
        SUM ( [value] ),
        ALLEXCEPT ( 'table', [category], [subcategory], [Year], [Month] )
    ),
    CALCULATE (
        MAX ( [total] ),
        ALLEXCEPT ( 'table', [category], [subcategory], [Year] )
    )
)

Yearly = 
DIVIDE (
    CALCULATE (
        SUM ( [value] ),
        ALLEXCEPT ( 'table', [category], [subcategory], [Year] )
    ),
    CALCULATE (
        MAX ( [total] ),
        ALLEXCEPT ( 'table', [category], [subcategory] )
    )
)

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
amitchandak
Super User
Super User

@bbsin , You have to unpivot the months. remove the total months.

https://radacad.com/pivot-and-unpivot-with-power-bi

 

Create date using month

Date = datevalue("01 "& [Month] )

 

Join sales and budget table with common date table and analyze



!! Microsoft Fabric !!
Microsoft Power BI Learning Resources, 2023 !!
Learn Power BI - Full Course with Dec-2022, with Window, Index, Offset, 100+ Topics !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors