The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
25 | |
10 | |
8 | |
7 | |
6 |
User | Count |
---|---|
32 | |
12 | |
10 | |
10 | |
9 |