Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Nonzy
Helper I
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? 

Nonzy_0-1713364185006.png

 

2 ACCEPTED SOLUTIONS
ryan_mayu
Super User
Super User

maybe try this

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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

v-jiewu-msft
Community Support
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.

vjiewumsft_0-1713419619547.png

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)

vjiewumsft_1-1713419640103.png

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.

vjiewumsft_2-1713419667896.png

 

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.

View solution in original post

3 REPLIES 3
v-jiewu-msft
Community Support
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.

vjiewumsft_0-1713419619547.png

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)

vjiewumsft_1-1713419640103.png

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.

vjiewumsft_2-1713419667896.png

 

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.

ryan_mayu
Super User
Super User

maybe try this

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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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. 

Nonzy_0-1713428848001.png

 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.