Forum Discussion
Anonymous
5 years agoNot applicable
Date Table
Hi Guys, I have a tricky situation in my model where I have 2 date tables ( created date and closed date). I have created a date table using dax but the issue is how to sync all 3 tables toge...
Jihwan_Kim
5 years agoSuper User
Hi, Anonymous
I tried to create a sample pbix file based on the explanation.
I suggest having a data model like the one below.
One dim-date table with inactive relationships, and use the USERELATIONSHIP function if needed.
All measures are in the sample pbix file.
Created Measure =
CALCULATE (
COUNTROWS ( 'Cases' ),
USERELATIONSHIP ( Dates[Date], 'Cases'[CreatedDate] )
)
Closed Measure =
CALCULATE (
COUNTROWS ( 'Cases' ),
USERELATIONSHIP ( Dates[Date], 'Cases'[ClosedDate] )
)
Open Measure =
CALCULATE (
COUNTROWS ( 'Cases' ),
FILTER (
'Cases',
'Cases'[CreatedDate] <= MAX ( Dates[Date] )
&& 'Cases'[ClosedDate] >= MIN ( Dates[Date] )
)
)
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
- Anonymous5 years agoNot applicable
thanks for the response.
I tried this approach but iys not working. I have shared a sample pbix file, let me know if this can be done.