Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
95 | |
94 | |
80 | |
71 | |
64 |
User | Count |
---|---|
115 | |
106 | |
96 | |
81 | |
72 |