Forum Discussion
PaisleyPrince
Advocate II
9 months agoMeasure required in Power BI matrix
Hi, I have a matrix showing values by weeks and months but i only want the week % to be shown as that related to the current month rather than the overall total as per the screenshot. Can you please...
- 9 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 )
Zanqueta
Super User
9 months agoHi PaisleyPrince,
Assuming you already have a measure for Sales (or similar), you can create a new measure for Week % of Month:
Week % of Month =
DIVIDE(
[Total Sales], // numerator: sales for the current week
CALCULATE(
[Total Sales],
REMOVEFILTERS('Date'[Week]), // remove week filter
KEEPFILTERS(VALUES('Date'[Month])) // keep current month context
),
0
)
If this response was helpful in any way, I’d gladly accept a 👍much like the joy of seeing a DAX measure work first time without needing another FILTER.
Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop 🌀.