Forum Discussion
Comparing two fact tables
- Anonymous6 years ago
Hi TonyBI ,
Here's the thing, If we put Item column in Legend field then the Values field can contain only one column. So generally, we need to union these two table as one.
My advice is to create a calculated table with below formula then create a measure and add it to visual filter to judge if the item is selected.
Table = UNION('Item table','Refernce table') Measure = IF(SELECTEDVALUE('union'[Item]) in VALUES('Item table'[Item])||SELECTEDVALUE('union'[Item]) in VALUES('Refernce table'[Item]),1,0)Here's the result and the slicers are from two different fact tables.
Pbix as attached.
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello folks, sorry to bother you again, but I´m really strugling with this problem. Original solution was really fine until I have to calculate cumulatives, they are really really slow. It seems to be checking for every item if the condition is ok (the metric in the solution), and then calculating the cumulative. The main issue is that I need to select items and references (the have their own dimension and fact tables), and show them in the same line chart with legend (the reason here is because I need to compare any or many items with any or many references).
Do you have any other work around? Thx very much!