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.
Hi all,
I have a measure that helps me index trading days shown below
var calc = CALCULATE(COUNTROWS(vw_calendar_BI), FILTER(ALL('vw_calendar_BI'), vw_calendar_BI[SingleDate] <= SELECTEDVALUE(vw_calendar_BI[SingleDate]) && vw_calendar_BI[Is_trading_day] = SELECTEDVALUE(vw_calendar_BI[Is_trading_day])),vw_calendar_BI[FinancialYear] = "2021-2022")
The measure works fine when a single slicer option is selected, but it doesn’t work as intended when both or no option is selected. (see below). Rather than combining the dates together and produce 1 index, it seems to simultaneously produce 2 separate index calculations.
My desired solution is to have the measure produce the correct index value when a filter is applied, and if no filter is applied, produce the index value for the entire range ( in 1 sequence)
Solved! Go to Solution.
@Bokchoy , Try like
var calc = CALCULATE(COUNTROWS(vw_calendar_BI), FILTER(ALL('vw_calendar_BI'), vw_calendar_BI[SingleDate] <= SELECTEDVALUE(vw_calendar_BI[SingleDate]) && vw_calendar_BI[Is_trading_day] in allselected(vw_calendar_BI[Is_trading_day])),vw_calendar_BI[FinancialYear] = "2021-2022")
@Bokchoy , Try like
var calc = CALCULATE(COUNTROWS(vw_calendar_BI), FILTER(ALL('vw_calendar_BI'), vw_calendar_BI[SingleDate] <= SELECTEDVALUE(vw_calendar_BI[SingleDate]) && vw_calendar_BI[Is_trading_day] in allselected(vw_calendar_BI[Is_trading_day])),vw_calendar_BI[FinancialYear] = "2021-2022")
hi @amitchandak ,
thanks for looking into my query, i was able to achieve what i want with the ISFILTERED() function in of my measure
Hi @amitchandak
your measure did work when both options are selected but it no longer works when a single filter is applied.
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 |
---|---|
86 | |
84 | |
66 | |
62 | |
60 |
User | Count |
---|---|
197 | |
118 | |
108 | |
78 | |
69 |