Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.