Forum Discussion
Anonymous
7 years agoNot applicable
Compare Plan and actual data
Hello All, I want to see the differences between Plan and Actual. I got the 2 tables form excel below. How do I make a table what I would like to see below? Thanks in advance.
AlB
Community Champion
7 years agoHi Anonymous
Although I believe it would be more convenient to do this in the query editor (M), you can also try creating a new calculated table with DAX:
TestTable =
VAR _BaseTable =
DISTINCT (
UNION (
SUMMARIZECOLUMNS ( Actual[Customer]; Actual[Product] );
SUMMARIZECOLUMNS ( Plan[Customer]; Plan[Product] )
)
)
RETURN
ADDCOLUMNS (
_BaseTable;
"Difference"; LOOKUPVALUE (
Actual[Qty];
Actual[Customer]; [Customer];
Actual[Product]; [Product]
)
- LOOKUPVALUE ( Plan[Qty]; Plan[Customer]; [Customer]; Plan[Product]; [Product] )
)
Anonymous
7 years agoNot applicable
HI @AIB,
Thanks a lot! it works excactly what I would like to see.
Best Regards,
SH Lee