cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## Sub-total per year in matrix with measures

Hi,

I am tracking the progress of a project schedule, and have created measure to calculate and plot the budgeted, actual and late progress. A baseline was performed in December 2022, therefore the columns for budgeted and late this year is blank, but they still sum up nicely at the top of the 2022 row.
My question is how to have the actual column to sum up for 2023?
Below are the measures, I have tried adding an [ResultIfFalse] = "" or 0 or ISBLANK(), but the subtotal still doesn't show up.

Any help is appreciated!

Pct_Actual =
VAR Cum_Actual = CALCULATE(SUM(Progress_All[Value]), FILTER(ALLSELECTED(Progress_All), Progress_All[Month End]<=MAX(Progress_All[Month End])), Progress_All[Spreadsheet Field]="Actual Cost")
VAR Total_Budget = CALCULATE(SUM(Progress_All[Value]),FILTER(ALLSELECTED(Progress_All),Progress_All[Spreadsheet Field]="Budgeted Cost"))
VAR Last_Date_Actual = MAX('Resources Actual'[Month End])
VAR Pct_Act = IF(Last_Date_Actual>=MAX(Progress_All[Month End]),Cum_Actual/Total_Budget)
return
Pct_Act
Pct_Budgeted =
VAR Cum_Budget = CALCULATE(SUM(Progress_All[Value]), FILTER(ALLSELECTED(Progress_All), Progress_All[Month End]<=MAX(Progress_All[Month End])), Progress_All[Spreadsheet Field]="Budgeted Cost")
VAR Total_Budget = CALCULATE(SUM(Progress_All[Value]),FILTER(ALLSELECTED(Progress_All),Progress_All[Spreadsheet Field]="Budgeted Cost"))
VAR Last_Date_Actual = MAX('Resources Actual'[Month End])
VAR Pct_Bud = IF(DATE(2022,12,29)<=MAX(Progress_All[Month End]),Cum_Budget/Total_Budget)

return
Pct_Bud

Pct_Late =
VAR Cum_Late = CALCULATE(SUM(Progress_All[Value]), FILTER(ALLSELECTED(Progress_All), Progress_All[Month End]<=MAX(Progress_All[Month End])), Progress_All[Spreadsheet Field]="Remaining Late Cost")

VAR Total_Budget = CALCULATE(SUM(Progress_All[Value]),FILTER(ALLSELECTED(Progress_All),Progress_All[Spreadsheet Field]="Budgeted Cost"))

VAR Pct_Late = IF(DATE(2022,12,29)<=MAX(Progress_All[Month End]),Cum_Late/Total_Budget)
return
Pct_Late

2 REPLIES 2
Frequent Visitor

Hi @v-yangliu-msft ,

I am not able to attach any files (and I've tried the option of using links to Dropbox/Drive etc. with a colleauge, it's unfortunately not working).
Is there any other way I can share the sample file with you?

Best regards,
Marte Wållgren

Community Support

Hi  @mwaall ,

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

Best Regards,

Liu Yang

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

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors