Forum Discussion
navafolk
5 years agoHelper IV
Merging column to current table column (without adding new column)
Hi pros, I have 2 tables like - 'Current' table: NAME CUR TYPE a usd on b eur off c jap on - 'New' table: NAME a d e How could I merge data from 'New...
- 5 years ago
Hi navafolk ,
Create a calculated table using below expression:
Table = var _tab=CALCULATETABLE(VALUES('Current'[NAME]),FILTER('Current','Current'[NAME]<>BLANK())) Return ADDCOLUMNS(UNION(_tab,EXCEPT(VALUES('New'[NAME]),VALUES('Current'[NAME]))),"CUR",CALCULATE(MAX('Current'[CUR]),FILTER('Current','Current'[NAME]=EARLIER('Current'[NAME]))),"TYPE",CALCULATE(MAX('Current'[TYPE]),FILTER('Current','Current'[NAME]=EARLIER('Current'[NAME]))))And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
navafolk
5 years agoHelper IV
Anyone, please help.
v-kelly-msft
5 years agoCommunity Support
Hi navafolk ,
Create a calculated table using below expression:
Table =
var _tab=CALCULATETABLE(VALUES('Current'[NAME]),FILTER('Current','Current'[NAME]<>BLANK()))
Return
ADDCOLUMNS(UNION(_tab,EXCEPT(VALUES('New'[NAME]),VALUES('Current'[NAME]))),"CUR",CALCULATE(MAX('Current'[CUR]),FILTER('Current','Current'[NAME]=EARLIER('Current'[NAME]))),"TYPE",CALCULATE(MAX('Current'[TYPE]),FILTER('Current','Current'[NAME]=EARLIER('Current'[NAME]))))
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!