Forum Discussion
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.
2 Replies
- kentylerSolution Sage
can you show sample data ? if the valor for months 4 or 5 is actually the year to date...how will you figure out what the monthly valor should be for those months ?
- stevdataFrequent Visitor
Thanks for your answer
I attached the data in google drive, maybe is better to have a look at the data
https://drive.google.com/drive/folders/1JpXZZOj41dSC3zKnAP0TrCoPAB6pvNgA?usp=sharing