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 table with multiple entries per user. Each entry represents an event (though that info is not relevant for this question).
user_id | filter |
123 | 30 |
123 | 180 |
355 | 30 |
355 | 60 |
490 | 90 |
The filter column determines if the event was sent X or less days ago. That is:
I use this column as a Slicer to allow the user to select certain periods of time.
I made the following measure to count the number of users that have logged at least one event in the last X days (based on the value that the user sets the slicer to):
events_filtered = DISTINCTCOUNT(my_table[user_id])
Solved! Go to Solution.
Hey @Anonymous ,
you can ignore a slicer with the ALL function. This function you can use as a context modifier in the CALCULATE function.
So the following approach should give you the result you want:
events_filtered =
CALCULATE (
DISTINCTCOUNT ( my_table[user_id] ),
ALL ( filter_Table[filter] )
)
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic
Hey @Anonymous ,
you can ignore a slicer with the ALL function. This function you can use as a context modifier in the CALCULATE function.
So the following approach should give you the result you want:
events_filtered =
CALCULATE (
DISTINCTCOUNT ( my_table[user_id] ),
ALL ( filter_Table[filter] )
)
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |