Forum Discussion
KimRexh
3 years agoRegular Visitor
Compare two columns in different tables
Hi, I have two disconnected tables (no relationship) that I want to compare. I want to have a slicer to choose the week of comparison. Actual table and Forcast table. I want to have a view like on ...
Anonymous
3 years agoNot applicable
Hi KimRexh ,
Here are the steps you can follow:
1. Create calculated table.
Table1 =
SUMMARIZE(
'Actual',
'Actual'[Manager],'Actual'[Role],'Actual'[sort])
2. Create measure.
Measure1 =
SUMX(
FILTER(ALL(Actual),
'Actual'[sort]=MAX('Table1'[sort])),[1944])Measure2 =
SUMX(
FILTER(ALL('Forecast'),
'Forecast'[sort]=MAX('Table1'[sort])),[1944])Flag =
IF(
[Measure1]<>[Measure2],1,0)
Result:
3. Create slicers with column headers.
Right-click Copy Actual Table in Power Query to form a new Copy:
Select all columns of Copy Table – Transform – Unpivot columns.
Click [Vlaue] – Remove Columns.
Select [Attribute] – Right-click – Remove Duplicates.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
KimRexh
3 years agoRegular Visitor
Thank you for your solution. So doing it this way I set the 1944 column static right?
What I would like, and I could have made it more clear in the desc. is I would like to compare all values (1944 (YYWW) goes from 2019-today) with two slicers.
Like this;