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 am trying to write a formula in the date table to calculate the number of ID's where the Date (on the date table) is between two dates on the ID table. See below for example: (Trying to create formula for highlighted column)
What I am trying to write a formula to tell me: DISTINCTCOUNT OF ID's if DATE (date table) is >=[Date Opened] AND DATE (Date table) is <=[Date Closed].
Any help would be greatly appreciated!
Solved! Go to Solution.
Hello @condo
I think this will work for you. It is a calculated column on the Date table.
Count of IDS =
CALCULATE(
DISTINCTCOUNT( 'ID Table'[ID] ),
FILTER (
'ID Table',
'ID Table'[Date Opened] <= 'Date Table'[Date] &&
'ID Table'[Date Closed] >= 'Date Table'[Date] )
)
Hello @condo
I think this will work for you. It is a calculated column on the Date table.
Count of IDS =
CALCULATE(
DISTINCTCOUNT( 'ID Table'[ID] ),
FILTER (
'ID Table',
'ID Table'[Date Opened] <= 'Date Table'[Date] &&
'ID Table'[Date Closed] >= 'Date Table'[Date] )
)
That did the trick- thanks!
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |