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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Derby
Regular Visitor

Calculate Measure is not showing values when Page Filter is applied to matrix

I have a series of measures which attempt to sum various accounts in an Income Statement into sub-totals. So there is a measure for Total Income, one for Total Cogs, one for total overeheads etc. I then use a SWITCH TRUE to pull those measures into the columns on my Income Statement. measure which sums my sales accounts.

 

All is working great until I apply a company filter to the PowerBI visual. The Calculate measures for the subtotals disappear when I try to filter for one company and comes back when there is no company filter on. Anyone got any ideas? Whent he company filter is applied i can still see the values from the ME_P&L SUBTOTALS below but the values from the ME_TOTAL INCOME disappear.

 

The Calculate measure for Total Sales in the income statement is...

ME_TOTAL INCOME = CALCULATE([ME_Amount], 'P27 TOP generalLedgerAccounts'[accountNumber] > 39999 && 'P27 TOP generalLedgerAccounts'[accountNumber] < 50000)
 
The SWITCH TRUE measure to give the income statment is....
ME_P&L Subtotals =
VAR CurrentItem = SELECTEDVALUE('P27 TOP incomeStatements'[display])
RETURN
SWITCH(TRUE(),
CurrentItem = "Total Income",CALCULATE('Measures (2)'[ME_TOTAL INCOME],ALL('P27 TOP incomeStatements')),
CurrentItem = "Total Cost of Goods Sold",CALCULATE('Measures (2)'[ME_COGS],ALL('P27 TOP incomeStatements')),
CurrentItem = "Gross Profit",CALCULATE('Measures (2)'[ME_GROSSPROFIT],ALL('P27 TOP incomeStatements')),
CurrentItem = "Total Overheads",CALCULATE('Measures (2)'[ME_OVERHEADS],ALL('P27 TOP incomeStatements')),
CurrentItem = "Ebitda",CALCULATE('Measures (2)'[ME_EBITDA],ALL('P27 TOP incomeStatements')),
CurrentItem = "Operating Profit",CALCULATE('Measures (2)'[ME_OPERATINGPROFIT],ALL('P27 TOP incomeStatements')),
CALCULATE([ME_Amount],
FILTER('P27 TOP incomeStatements', 'P27 TOP incomeStatements'[display] = CurrentItem)))
0 REPLIES 0

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.