Forum Discussion

stevdata's avatar
stevdata
Frequent Visitor
6 years ago

Difference between two columns from different tables with conditions

Hello community

 

I've got a table EjercicioContable where the column IdentificadorCuenta has values from 1 to 9 and the column Valor has the total sales per month, however when IdentificadorCuenta=4 or IdentificadorCuenta=5 the column Valor is showing the YTD (this YTD was not calculated with PowerBI).  I need to create a new column to show the total per month rather than YTD for every value IdentificadorCuenta  from 1 to 9.

 

I think I need to create a copy of the table, but I am not sure about to do a merge or create a many to many relationships and then create a calculated column based on date conditions and identificadorCuenta.

Thanks for your help.