The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I created the following measure to lookup data in a table. It works perfectly by itself but the matrix disappears when I add slicers and select a level of the matrix which is not visible in the matrix. I want it to behave as if it was using additive data. I have attached a page (additive) with the problem choosing Argentina in the L4 slicer. The matrix has disappeared. The other page gives the same with an additive measure and showing the behavior I would like. I would be very grateful with help to correct this measure to give the behavior I need. I attached a link to the file. Thanks.
If the measure is genuinely non-additive then you could change the measure to return Result + 0. That would force a value to be returned for each level of the hierarchy, allowing you to drill down until you reach the level which does return a value.
If the measure is additive, which this appears to be, you could simplify it to
Len_CM =
VAR SelectedMonth = FORMAT( [Len_LatestDate], "mmm" )
VAR SelectedYear = FORMAT( [Len_LatestDate], "yyyy" )
VAR Result =
CALCULATE(
[Len_Amt],
'Calendar'[Month] = SelectedMonth,
'Calendar'[Year] = SelectedYear
)
RETURN
Result
User | Count |
---|---|
11 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
22 | |
14 | |
14 | |
9 | |
7 |