Forum Discussion
HamidBee
Power Participant
4 years agoHow do I create a new Table with two columns from two different tables (No measures)?
I am trying to create a new table which contains two columns. Column 1 will calculate the difference between Value 2021 and Value 2020. Column 2 will calculate the percentage change using value 2020 ...
- 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.
Anonymous
4 years agoNot applicable
HamidBee if it's just by attribute that you're looking for, you could do this simply by adding an "Attribute" dimension table to your model, and creating a couple simple measures.
Attributes = DISTINCT(UNION(DISTINCT('2020'[Attribute]),DISTINCT('2021'[Attribute])))
Value 2020 = SUM('2020'[Value])
Value 2021 = SUM('2021'[Value])
Difference = [Value 2021] - [Value 2020]
% Change = DIVIDE([Difference],[Value 2020])