Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I have what i thought was a fairly simple measure to allow a visual to be filtered by selection and default to the current month if nothing is selected:
the measure works as expected if a month is selected, it even returns the correct value if nothing is selected (checked by putting it in a card) but the visual is not filtering to the defult (current) month if nothing is selected. i made the default month a variable to see if that would fix and it is still not working - I'm stuck as to what to try next?
The Measure:
IF(
DISTINCTCOUNT( DIM_Calendar[MonthYear] )=1,
the correct value,
the defult (current)value
)
i tried this and it didnt work, the card now shows blank if nothing is selected:
Selected Month =
IF (
DISTINCTCOUNT ( DIM_Calendar[MonthYear] ) = 1,
SELECTEDVALUE (
DIM_Calendar[MonthYear],
CALCULATE (
DISTINCT ( DIM_Calendar[MonthYear] ),
DIM_Calendar[CurMonthOffset] = 0
)
)
)
IS this what you want?
my measure does that the problem is when the alternate result is returned for selected value it doesnt pass to a filter. note it is returning the correct value just not filtering.
i tried to simplify the dax to make it easier to trouble shoot - the full measure is here:
If i select a month it filters correctly:
if no date is selected it shows all the data:
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
21 | |
21 | |
19 | |
13 | |
12 |
User | Count |
---|---|
42 | |
28 | |
23 | |
22 | |
22 |