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.
I have a CALENDER table with LASTDAY column. On the page level I have applied filter:
CALENDER[LASTDAY] is on or after 1/1/2021
I have a slicer on the page having all the months. What I want to do is to compare ALLSELECTED(CALENDER[LASTDAY]) with ALL(CALENDER[LASTDAY]). But for the ALL(CALENDER[LASTDAY]) it is also neglecting Page Level filter values and considering all the values. So in that case, how can I use ALL and FILTER together?
What I want is: ALL should consider Page Level Filter because I need all values that are on or after 1/1/2021... Please guide, I used this:
Solved! Go to Solution.
The format of your lastday column is incorrect. Should say
>= "2022-01-01"
I think you might possibly be misunderstanding ALLSELECTED. It bring back the filter context as it was at the creation of a visual (for example all the rows in the matrix rather than the current row).
ALLSELECTED effectively then gives you the values selected by any slicers/page filters. No way to separate where they came from.
ALL removes all filters including page filters.
Sure we can find a way round but it's not easy.
Are the page filters static? If so you could manually add them back into filter context.
Alternative approach would be to use a disconnect table to drive the slicer and then pass the filter in DAX using:
TREATAS (
VALUES ( DiscTable[ColumnName] ),
OrigTable ( ColumnName]
)
Hi, Thanks for the response. Yes, page level filters are static and as mentioned above, I am trying to apply those manually to ALL():
_DefaultALL = COUNTX(FILTER(ALL(CALENDAR_DIM[LASTDAY]), CALENDAR_DIM[LASTDAY] >= 1/1/2022), CALENDAR_DIM[LASTDAY])
But somehow this filter CALENDAR_DIM[LASTDAY] >= 1/1/2022 is not getting applied.
How can we apply this?
Thanks.
The format of your lastday column is incorrect. Should say
>= "2022-01-01"
Yes, thanks. I think you are correct. 🙂
ALL removes all filters. Use ALLSELECTED instead.
Thanks for replying. But I have to do a comparison of ALL() and ALLSELECTED(). 🙂
For example, I am selecting months from a slicer and........ IF(ALLSELECTED() = ALL(), DO THIS, DO THAT).
Any way of achieving this?
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 |
---|---|
112 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |