Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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.
User | Count |
---|---|
98 | |
90 | |
78 | |
72 | |
65 |
User | Count |
---|---|
114 | |
98 | |
96 | |
68 | |
67 |