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 need to count current "Active Members".
Meaning, when I slide my date filter to the right, the count should not change, they are still active members.
But I would like to have the count change when I slide my filter to the left, counting how many active members I had during that time period.
Is there a measure I can write?
I also need to indentify Public counts, I created a PK date and Public column concatendate to link to my calendar table.
My below table:
display_name | Public | first_grant_dt | last_grant_dt | access_revoked_date | pk |
Red | N | 11/16/2022 | 11/29/2022 | NULL | 2022-11-16T00:00:00.0000000ZN |
Blue | N | 7/26/2022 | 9/21/2022 | NULL | 2022-07-26T00:00:00.0000000ZN |
Green | N | 10/12/2021 | 9/13/2022 | NULL | 2021-10-12T00:00:00.0000000ZN |
Yellow | Y | 7/1/2021 | 12/31/9999 | NULL | 2021-07-01T00:00:00.0000000ZY |
Pink | Y | 7/1/2021 | 12/31/9999 | NULL | 2021-07-01T00:00:00.0000000ZY |
Solved! Go to Solution.
You'll want the date used for the slicer to be disconnected from the date fields in your table (either using an unrelated date dimension or by explicitly ignoring the slicer values in your main calculation context.
You can store the values from the slicer as variables e.g. something like:
Var MinDate = Min('Unrelated Date Table'[Date])
Var MaxDate = Max('Unrelated Date Table'[Date])
RETURN
Calculate(Count('table'[display_name]),
ALLEXCEPT('table','table'[display_name]),
'table'[first_grant_d]<=MaxDate && 'table'[last_grant_d]>=MinDate)
You'll want the date used for the slicer to be disconnected from the date fields in your table (either using an unrelated date dimension or by explicitly ignoring the slicer values in your main calculation context.
You can store the values from the slicer as variables e.g. something like:
Var MinDate = Min('Unrelated Date Table'[Date])
Var MaxDate = Max('Unrelated Date Table'[Date])
RETURN
Calculate(Count('table'[display_name]),
ALLEXCEPT('table','table'[display_name]),
'table'[first_grant_d]<=MaxDate && 'table'[last_grant_d]>=MinDate)
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 June 2024 Power BI update to learn about new features.
User | Count |
---|---|
43 | |
33 | |
20 | |
17 | |
15 |
User | Count |
---|---|
56 | |
50 | |
36 | |
35 | |
28 |