The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
78 | |
66 | |
52 | |
51 |
User | Count |
---|---|
121 | |
116 | |
77 | |
64 | |
63 |