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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
cbtekrony
Resolver I
Resolver I

% change not showing for last year in table

I'm sure someone can easily resolve this, I can't.  Here is my DAX for Current Yr Growth %:

Current Yr Growth% =
VAR py_sales =
CALCULATE (
[Total Past ACV and Estimate],
FILTER (
ALLSELECTED ( 'Calendar Table'[Year] ),
'Calendar Table'[Year]
= MAX ( 'Calendar Table'[Year] ) - 1
)
)
VAR YOY_Sales = [Total Past ACV and Estimate] - py_sales
RETURN
DIVIDE ( YOY_Sales, py_sales )
 
See image, the last year in the table will show percent. You can't see it all, but the percentage to the right of $12.3M is missing.You can't see it all, but the percentage to the right of $12.3M is missing.

 

1 ACCEPTED SOLUTION
cbtekrony
Resolver I
Resolver I

I created a new column for previous years sales, I think I was using SAMEPERIODLASTYEAR somewhere and that was messing things up. 

 

Prev Yr PV = CALCULATE([Total Past ACV and Estimate], PREVIOUSYEAR('Calendar Table'[Date]))
 
YoY Change = DIVIDE( [Total Past ACV and Estimate] - [Prev Yr PV] , [Prev Yr PV])
 
This created a percentage for the last year in the list. 

View solution in original post

3 REPLIES 3
cbtekrony
Resolver I
Resolver I

I created a new column for previous years sales, I think I was using SAMEPERIODLASTYEAR somewhere and that was messing things up. 

 

Prev Yr PV = CALCULATE([Total Past ACV and Estimate], PREVIOUSYEAR('Calendar Table'[Date]))
 
YoY Change = DIVIDE( [Total Past ACV and Estimate] - [Prev Yr PV] , [Prev Yr PV])
 
This created a percentage for the last year in the list. 
v-yiruan-msft
Community Support
Community Support

Hi @cbtekrony ,

It seems that in the rows which the value of Current Yr Growth % is blank, the corresponding values of YOY_Sales and py_sales is blank (one of them is blank or both are blank). Could you please  provide the formula of measure [Total Past ACV and Estimate] and sample data in relevant tables to make troubleshooting in order to find the cause to solve it? Thank you.

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
az38
Community Champion
Community Champion

@cbtekrony 

interesting. have you tried to debug?

RETURN
YOY_Sales
 
then
 
RETURN
py_sales 

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors