Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
MLBLom
Frequent Visitor

Trouble with the total on a matrix

I am having trouble with the total on a matrix. I am totaling monthly expenses which are month to date expenses + total encumbrances.

2TotalExpense = ('SB_PBI_VW_COMBINED_BUDGET_EXPENSE_DATA'[MTD] + 'SB_PBI_VW_COMBINED_BUDGET_EXPENSE_DATA'[RUNNINGENCUMBRANCE])

 

More details of the individual measures:

 

MTD =

VAR MAXACCTPERIOD2='SB_PBI_VW_COMBINED_BUDGET_EXPENSE_DATA'[MAXACCTPERIOD]

RETURN

CALCULATE(SUM(SB_PBI_VW_COMBINED_BUDGET_EXPENSE_DATA[TOTAL_EXPENSED_AMT]), FILTER(SB_PBI_VW_COMBINED_BUDGET_EXPENSE_DATA, SB_PBI_VW_COMBINED_BUDGET_EXPENSE_DATA[LEDGER]="ORG_EX"), FILTER('SB_PBI_VW_COMBINED_BUDGET_EXPENSE_DATA', 'SB_PBI_VW_COMBINED_BUDGET_EXPENSE_DATA'[ACCOUNTING_PERIOD]=MAXACCTPERIOD2))

 

 

RunningEncumbrance =

CALCULATE([3 New Encumbrance Amount],

                   Window(

                       1, ABS,

                   0, REL,

                       SUMMARIZE(ALLSELECTED('SB_PBI_VW_COMBINED_BUDGET_EXPENSE_DATA'), 'SB_PBI_VW_COMBINED_BUDGET_EXPENSE_DATA'[ACCOUNTING_PERIOD]),

                       ORDERBY('SB_PBI_VW_COMBINED_BUDGET_EXPENSE_DATA'[ACCOUNTING_PERIOD])))

 

3 New Encumbrance Amount = CALCULATE(SUM(SB_PBI_VW_COMBINED_BUDGET_EXPENSE_DATA[TOTAL_EXPENSED_AMT]), FILTER(SB_PBI_VW_COMBINED_BUDGET_EXPENSE_DATA, SB_PBI_VW_COMBINED_BUDGET_EXPENSE_DATA[LEDGER]="ORG_EN"))

 

MLBLom_1-1700056110935.png

 

 My totals for the individual accounting periods come out correct in the screenshot below but the Row total at the end gives the total of accounting period 12.  I would like for it to give the sum of all of the individual monthly expense amounts (acct periods 1 – 12) that are displayed which should equal $68,401,258.17 not $5,443,001.42.

 

MLBLom_0-1700055965300.png

 

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

View solution in original post

2 REPLIES 2
MLBLom
Frequent Visitor

Resolved using a second SQL 'view'.   Assistance no longer needed.

lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Europe Fabric Conference

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.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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