Forum Discussion
SUM 2 years
Hello to everybody!
I need some of your wisdom.
I have the turnover for 1 year and I would like to add the turnover for the next month with the turnover from the same period last year. I already have that.
The problem comes when I need to get the total. Why is this an equal value? The second one should be 46,62.
Does anyone have an answer for that?
Thank you so much for your attention and participation.
2 Replies
- lbendlin
Super User
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 - AnonymousNot applicable
Hi Juanherir ,
May I ask if [ROTACION_PROYECTADA] is a measure?
Measure follows the context of the "Total" row and is calculated in that context. Therefore, using a measure in a column of a table visualization may have unexpected values in the "Total" column.
You can use the following measure, using the IF()+HASONEVALUE() function, to determine if it is Total, and if it is, you can calculate it according to your own needs, such as Average, Sum, etc.
You can try using the following measure.
Measure = var _table=SUMMARIZE('Table','Table'[ORDER],"Value",[ROTACION_PROYECTADA]) return IF( HASONEVALUE('Table'[ORDER]),[ROTACION_PROYECTADA],SUMX(_table,[Value]))Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly