Forum Discussion
How do I create a new Table with two columns from two different tables (No measures)?
- 4 years ago
Hi, HamidBee
You don't need add a new table, you can directly add calculated columns to the table ‘2021’ as follows:
Dates_1 = DATEADD('Calendar'[Date],-1,YEAR)Value_1 = LOOKUPVALUE('2020'[Value],'2020'[Dates],'2021'[Dates_1],'2020'[Attribute],'2021'[Attribute])Difference = '2021'[Value]-'2021'[Value_1]Percentage = IF('2021'[Value_1]=0,BLANK(),'2021'[Difference]/'2021'[Value_1])*100Result:
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi HamidBee
After adding Table Attribute like Anonymous proposed you can add this Table according to Attribute Granularity
It wouldn't make sense to use Date as the Granularity since the 2 tables (2020 & 2021) are containing different values from 2 different years
- HamidBee4 years ago
Power Participant
I was really only hoping that the month would show as that is what I am comparing. Please see the answer I sent to "ebeery".
- v-easonf-msft4 years ago
Community Support
Hi, HamidBee
You don't need add a new table, you can directly add calculated columns to the table ‘2021’ as follows:
Dates_1 = DATEADD('Calendar'[Date],-1,YEAR)Value_1 = LOOKUPVALUE('2020'[Value],'2020'[Dates],'2021'[Dates_1],'2020'[Attribute],'2021'[Attribute])Difference = '2021'[Value]-'2021'[Value_1]Percentage = IF('2021'[Value_1]=0,BLANK(),'2021'[Difference]/'2021'[Value_1])*100Result:
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.