Forum Discussion
Building Table issue
- 1 year ago
To create measures in Power BI that will allow you to format a matrix and show the variance between Total Budget and Total Actual based on the Quarter, you can follow these steps:
Create Measures for Total Budget and Total Actual:
DAX
Total Budget = CALCULATE(SUM('Table'[Amount]), 'Table'[Ledger Type] IN {"Budget", "SPBudget"})
Total Actual = CALCULATE(SUM('Table'[Amount]), 'Table'[Ledger Type] IN {"Actual", "SPActual"})
Create a Measure for Variance:Next, create a measure to calculate the variance between the total budget and total actual amounts.
Variance = [Total Actual] - [Total Budget]
Format the Matrix:Add a matrix visual to your report.
Drag the Year and Quarter fields to the Rows area.
Drag the Total Budget, Total Actual, and Variance measures to the Values area. - Anonymous1 year ago
Hi, Acmanning
In your Matrix visual, simply drag the “Quarter” field to the rows area and the “Total Budget”, “Total Actual Total Budget”, ‘Total Actual’ and ‘Variance’ Measure to the value area, like this:
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
To create measures in Power BI that will allow you to format a matrix and show the variance between Total Budget and Total Actual based on the Quarter, you can follow these steps:
Create Measures for Total Budget and Total Actual:
DAX
Total Budget = CALCULATE(SUM('Table'[Amount]), 'Table'[Ledger Type] IN {"Budget", "SPBudget"})
Total Actual = CALCULATE(SUM('Table'[Amount]), 'Table'[Ledger Type] IN {"Actual", "SPActual"})
Create a Measure for Variance:
Next, create a measure to calculate the variance between the total budget and total actual amounts.
Variance = [Total Actual] - [Total Budget]
Format the Matrix:
Add a matrix visual to your report.
Drag the Year and Quarter fields to the Rows area.
Drag the Total Budget, Total Actual, and Variance measures to the Values area.