Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
LastYearStoreCount = VAR lastFromDate = SELECTEDVALUE(WUSA_VIEW[From_Date1], TODAY()) - 364 VAR lastToDate = SELECTEDVALUE(WUSA_VIEW[To_Date1], TODAY()) - 364 RETURN IF([DateDiff] > 365, 0,
IF( FILTER(ALL(WUSA_CAL_DIM), WUSA_CAL_DIM[End_Date] >= lastFromDate && WUSA_CAL_DIM[End_Date] <= lastToDate),DISTINCTCOUNT(WUSA_STORE_DIM[Store Code]) ))
There is something wrong in the final if statement. Your filter statement is covering the entire if so there is no actual comparison happening.
I think what you actually need is a calculate statement instead of the if statement:
CALCULATE( DISTINCTCOUNT(WUSA_STORE_DIM[Store Code]), ALL(WUSA_CAL_DIM), WUSA_CAL_DIM[End_Date] >= lastFromDate, WUSA_CAL_DIM[End_Date] <= lastToDate )
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
84 | |
83 | |
64 | |
61 | |
55 |
User | Count |
---|---|
179 | |
108 | |
105 | |
71 | |
70 |