cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Helper I

## Totals are wrongly measured.

Hi,

Not an expert in PBI, need your help!

I am doing a simple YOY analysis where I have Total Aloc as total sales and LY Total aloc as last year total sales. I have YOY as difference between both. Total of YOY is showing incorrectly. It should be -13M as per the 3 values shown. Not sure why it is showing like this. Can you please support on this?

2 ACCEPTED SOLUTIONS
Super User

maybe try this

measure=sumx(values(Date.N), [YOY])

Proud to be a Super User!

Community Support

Hi @Nonzy ,

First of all, many thanks to  for your very quick and effective replies.
Based on my testing, because the YOY is calculated by Total – LY total, so the last row Total is error.

I will give some additions below:

1.Create the sample table.

2.Create the new measure to calculate difference.

``````Difference =
VAR cur_total = SUMX('Table', 'Table'[Total Aloc order])
VAR ly_total = SUMX('Table', 'Table'[LY Total Aloc order])
VAR result = cur_total - ly_total
RETURN
IF(ISBLANK(ly_total), BLANK(), result)``````

3.Create the new measure to calculate YOY total.

``YOY = SUMX('Table', [Difference])``

4.Drag the new measure into the table visual. The result is shown below.

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 REPLIES 3
Community Support

Hi @Nonzy ,

First of all, many thanks to  for your very quick and effective replies.
Based on my testing, because the YOY is calculated by Total – LY total, so the last row Total is error.

I will give some additions below:

1.Create the sample table.

2.Create the new measure to calculate difference.

``````Difference =
VAR cur_total = SUMX('Table', 'Table'[Total Aloc order])
VAR ly_total = SUMX('Table', 'Table'[LY Total Aloc order])
VAR result = cur_total - ly_total
RETURN
IF(ISBLANK(ly_total), BLANK(), result)``````

3.Create the new measure to calculate YOY total.

``YOY = SUMX('Table', [Difference])``

4.Drag the new measure into the table visual. The result is shown below.

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Super User

maybe try this

measure=sumx(values(Date.N), [YOY])

Proud to be a Super User!

Helper I

Thanks a lot Ryan, it worked. Quick one on the same, I am also trying to do YOY% and tried using your solution but it doesn't work. Should I do something differently? for YOY%, it is showing Infinity.

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors