Forum Discussion
Append 2 calculated columns using DAX
- 5 years ago
Hi v-xicai
Thank you for your replay.
The first solution I thought about was using a matrix by it didn't answer my need which was appending those 2 columns in one new column.After hours I acheived the result I was looking for by using the function UNION
Thank you community.
Hi DataVitalizer ,
Got it. While it is impossible to achieve your requirement completely, which put two columns into single column as the layout you showed. As a workaround, you may put [Rubric], [IND L1] and [IND L2] into Rows box Matrix visual, put the [Date] and [Value PY] into Values box.
To get the [Value PY], you may create calendar table firstly, then create measure like DAX below.
Calculated table:
Calendar= CALENDARAUTO()
Measure:
Value PY = CALCULATE(SUM(Table1[Value]),SAMEPERIODLASTYEAR(Calendar[Date]))
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-xicai
Thank you for your replay.
The first solution I thought about was using a matrix by it didn't answer my need which was appending those 2 columns in one new column.
After hours I acheived the result I was looking for by using the function UNION
Thank you community.