Forum Discussion
pjfiscus
8 years agoNew Member
Plotting 2 dates from same table onto line chart
Trying to create a line graph that looks like this: In the PBX I am building this is what mine looks like, only getting one line and the counts are the same. I had 2 date tables, one for o...
v-cherch-msft
Microsoft Employee
8 years agoHi pjfiscus
You may try to use USERELATIONSHIP Function to create measures. Here are the references for you.
https://carldesouza.com/power-bi-dax-userelationship-multiple-dates/
https://www.sqlbi.com/articles/userelationship-in-calculated-columns/
Show a simplified sample as below:
First, You may try to create 2 relationships for calendar table and your ticket table. Then create measures for opendatekey and closedatekey.
CloseDateCount =
CALCULATE (
COUNT ( Table7[CloseDateKey] ),
USERELATIONSHIP ( Table7[CloseDateKey], 'calendar'[Column] )
)OpenDateCount =
CALCULATE (
COUNT ( Table7[OpenDateKey] ),
USERELATIONSHIP ( Table7[OpenDateKey], 'calendar'[Column] )
)Regards,
Cherie