Forum Discussion
Total in bar graph and table is wrong
- 4 years ago
Try this measure:
Previous Year = SUMX ( 'Fecha table', CALCULATE ( [Sum Venta], DATEADD ( 'Fecha table'[Date], -1, YEAR ) ) )
Hey Paul,
I marked as data table and lost the hierarchy; then I did my own using Fecha as a hierarchy “root”, and manually add year, month, and day, but the results were exact same thing; in the daily view, the day shows the correct amount, and same thing than the table but once I build my own hierarchy and show monthly results, I got the wrong result.
Besides that, even if I don’t use hierarchy, only “Fecha” (marked as date Table), got same wrong result $5,564,885.04 instead of $1,731,496.46:
Can you share some sample data (non-confidential) please?
- Abevann4 years ago
Helper III
Sure, I'll clean up the data and then send it, thanks
- Abevann4 years ago
Helper III
There you go, thanks!
https://1drv.ms/x/s!AlLivjsApnMZhK5AhdooEGIAMAMZlg?e=PlWztb
With this data, I have this simple GUI, with same results, the sum is $5,564,885.04; if I filter up to May 12, the sum is correct.
- PaulDBrown4 years ago
Community Champion
Try this measure:
Previous Year = SUMX ( 'Fecha table', CALCULATE ( [Sum Venta], DATEADD ( 'Fecha table'[Date], -1, YEAR ) ) )- Abevann4 years ago
Helper III
I will and let you know, thanks