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.
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.
Sorry to bother you again my friend, but I have another problem. The chart is working great, but when I try to replicate it with average values, it gives me the exact same chart... The idea is to have both charts, first one with all items an references selected as legend, and then another chart with the average of item selected and the average of refernces selected. Any idea of what could be wrong?
Thx in advance!