The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am trying to figure out the DAX for a measurement that when ploted on a line graph against a Date table named "Date" would give you the total Activities remaining. The below data would give you 20 Activities remaining before 3/8/2022. On 1/2/2023 there would be 14 activities remaining. If you looked at the link chart for June 30th 2024 there would be 6 activities remaining. It can be end of month if that is easier.
Activity ID | BL Finish |
ACT-Con-001 | 3/8/2022 |
ACT-Con-002 | 3/11/2022 |
ACT-Con-003 | 7/14/2022 |
ACT-Con-004 | 11/16/2022 |
ACT-Con-005 | 11/19/2022 |
ACT-Con-006 | 1/22/2023 |
ACT-Con-007 | 3/27/2023 |
ACT-Con-008 | 5/30/2023 |
ACT-Con-009 | 8/2/2023 |
ACT-Con-010 | 10/5/2023 |
ACT-Con-011 | 12/8/2023 |
ACT-Con-012 | 2/10/2024 |
ACT-Con-013 | 4/14/2024 |
ACT-Con-014 | 6/17/2024 |
ACT-Con-015 | 8/20/2024 |
ACT-Con-016 | 10/23/2024 |
ACT-Con-017 | 12/26/2024 |
ACT-Con-018 | 2/28/2025 |
ACT-Con-019 | 5/3/2025 |
ACT-Con-020 | 7/6/2025 |
Solved! Go to Solution.
Assuming here in DAX measure activty remaning table is named Activities and your Date table is named Date:
Activities Remaining =
VAR CurrentDate = MAX('Date'[Date])
RETURN
CALCULATE(
COUNTROWS('Activities'),
FILTER(
'Activities',
'Activities'[BL Finish] >= CurrentDate
)
)
Assuming here in DAX measure activty remaning table is named Activities and your Date table is named Date:
Activities Remaining =
VAR CurrentDate = MAX('Date'[Date])
RETURN
CALCULATE(
COUNTROWS('Activities'),
FILTER(
'Activities',
'Activities'[BL Finish] >= CurrentDate
)
)
User | Count |
---|---|
11 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
23 | |
14 | |
13 | |
10 | |
8 |