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 I'm trying to summarize:
Master table
ID Worked
1 1/1/2018
2 3/4/2017
3 5/2/2015
4 6/7/2018
....
by using my specialized Calendar table:
Date PostingDay
1/1/2018 False
1/2/2018 True
1/3/2018 True
1/4/2018 True
.....
I need to add either a column or measure to the master table which will count the days in the Calendar table between master.worked and today, but only where Calendar.PostingDay = TRUE.
I have a relationship between the master table and calendar table joining Calendar.Date as a one-to-many with master.Worked.
Still pretty new to DAX so I've muddled myself under CALCULATE, COUNTX, etc and I'm not sure how to get this info.
Any ideas? Thanks in advance
Solved! Go to Solution.
I believe you want something along the lines of:
Measure = VAR __worked = MAX('Master'[Worked]) RETURN COUNTX(FILTER(ALL('Calendar'),[PostingDay] = TRUE() && [Date]<=TODAY() && [Date]>=__worked),[Date])
Hi,
Could you share the exact expected layout and result.
I believe you want something along the lines of:
Measure = VAR __worked = MAX('Master'[Worked]) RETURN COUNTX(FILTER(ALL('Calendar'),[PostingDay] = TRUE() && [Date]<=TODAY() && [Date]>=__worked),[Date])
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 |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |