Forum Discussion
Measure required in Power BI matrix
- 8 months ago
Please check and confirm
Base measure
Total Invoice Value :=
SUM ( FactInvoices[InvoiceValue] )
Final single % measure (use this in matrix)
Div Week % of Month :=
VAR MonthTotal =
CALCULATE (
[Total Invoice Value],
REMOVEFILTERS ( Date[WeekNo], FactInvoices[Division] )
)
RETURN
DIVIDE ( [Total Invoice Value], MonthTotal, 0 )
Hi,
I have a matrix showing values by weeks and months invoice values by division but i want the division & week % to be shown as that related to the current month total rather than the overall total as per the screenshot. Can you please advise how this would be done ?
- krishnakanth2408 months ago
Super User
Please check and confirm
Base measure
Total Invoice Value :=
SUM ( FactInvoices[InvoiceValue] )
Final single % measure (use this in matrix)
Div Week % of Month :=
VAR MonthTotal =
CALCULATE (
[Total Invoice Value],
REMOVEFILTERS ( Date[WeekNo], FactInvoices[Division] )
)
RETURN
DIVIDE ( [Total Invoice Value], MonthTotal, 0 ) - rohit19918 months ago
Super User
Hii PaisleyPrince
You need a measure that calculates the % against the current month total, not the grand total. Use CALCULATE with ALLEXCEPT (or REMOVEFILTERS) to keep the Month context while removing Week/Division filters. For example:
Div Week % = DIVIDE( [Invoice Value], CALCULATE( [Invoice Value], ALLEXCEPT('Date', 'Date'[Month]) ) ) - Tahreem248 months ago
Super User
PaisleyPrince Try this measure:
Measure =DIVIDE( [Invoice Value], CALCULATE([Invoice Value],REMOVEFILTER('Date'[Week No]))) - cengizhanarslan8 months ago
Super User
Please check the formula below:
Div1 % = DIVIDE( [Inv Div1], CALCULATE( [Inv Div1], REMOVEFILTERS('Date'[WeekNo]) ) )and use it for 2 and 3 by creating seperate measures.