Forum Discussion
Line and clustered column chart
- 7 years ago
Hi kasebast ,
You need to create a bridge table with all the weeks on your created and closed week, then make two relationships between that table and the two columns on your data table.
Then create the following measures:
Created = COUNT(Table1[Created Week]) Closed = IF ( MAX ( WEEK[WEEK] ) = BLANK (); BLANK (); CALCULATE ( COUNT ( Table1[Closed Week] ); USERELATIONSHIP ( Table1[Closed Week]; WEEK[WEEK] ) ) )Assuming that the active relationship is on the open date.
Then add the week from the bridge table on x-axis and the measures on values.
Check PBIX file attach.
Regards,
MFelix
Hi kasebast ,
You need to create a bridge table with all the weeks on your created and closed week, then make two relationships between that table and the two columns on your data table.
Then create the following measures:
Created = COUNT(Table1[Created Week])
Closed =
IF (
MAX ( WEEK[WEEK] ) = BLANK ();
BLANK ();
CALCULATE (
COUNT ( Table1[Closed Week] );
USERELATIONSHIP ( Table1[Closed Week]; WEEK[WEEK] )
)
)
Assuming that the active relationship is on the open date.
Then add the week from the bridge table on x-axis and the measures on values.
Check PBIX file attach.
Regards,
MFelix
Hi MFelix,
Thank you so much for helping me out. I had some issues with creating a bridge and measures porbably cuz i hadnt done any yet but now the issue is solved. Thanks a lot. But I would really like to know how does the USERELATIONSHIP command filter? I tried understanding but i still dont have a clear understanding. It would be great if you could explain it a bit.
- MFelix7 years agoSuper User
Hi kasebast ,
The USERELATIONSHIP formula specifies the relationship to be used in a specific calculation as the one that exists between columnName1 and columnName2, in this case what is doing is making active and inactive relationship between two tables making the calculation being forced to use the columns referene in the syntax.
Regards,
MFelix