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
Anonymous
Not applicable

looking for advice - percentage change

dear all,

need some advice here, i have this file

is it possible using this file to get the percentage change, is so what are the possible steps?

Thanks so much in advance

2 ACCEPTED SOLUTIONS
dax
Community Support
Community Support

Hi mellyVK,

I create a column like below(you could refer to my  upload sample)

FinancialYearNo = 
IF (
AND (
'DATA1'[Date] >= DATE ( 2015, 4, 1 ),
'DATA1'[Date] <= DATE ( 2016, 3, 31 )
),
15, 

IF (
AND (
'DATA1'[Date] >= DATE ( 2016, 4, 1 ),
'DATA1'[Date] <= DATE ( 2017, 3, 31 )
),
16, 

IF (
AND (
'DATA1'[Date] >= DATE ( 2017, 4, 1 ),
'DATA1'[Date] <= DATE ( 2018, 3, 31 )
),
17, 

14)
))


Then create measures like below

current = CALCULATE(SUM(DATA1[Value]), ALLEXCEPT(DATA1,DATA1[Product],DATA1[FinancialYear]))
pre = CALCULATE(SUM(DATA1[Value]),FILTER( ALLEXCEPT(DATA1,DATA1[Product]) , DATA1[FinancialYearNo]=MIN(DATA1[FinancialYearNo])-1)) 
% change = if(ISBLANK([pre])|| [pre]=0 ,0,([current]-[pre])/[pre])

286.PNG

Best Regards,
Zoe Zhi

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

dax
Community Support
Community Support

Hi mellyVK,

You could set format like below for %change

 

311.PNG

In addition, for thr measures

current = CALCULATE(SUM(DATA1[Value]), ALLEXCEPT(DATA1,DATA1[Product],DATA1[FinancialYear])) 
// this calculate total based on product and year group
pre = CALCULATE(SUM(DATA1[Value]),FILTER( ALLEXCEPT(DATA1,DATA1[Product]) , DATA1[FinancialYearNo]=MIN(DATA1[FinancialYearNo])-1))
// DATA1[FinancialYearNo]=MIN(DATA1[FinancialYearNo])-1) filter year is previous year of current row, then calculate total
% change = if(ISBLANK([pre])|| [pre]=0 ,0,([current]-[pre])/[pre])

 

Best Regards,
Zoe Zhi

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

7 REPLIES 7
parry2k
Super User
Super User

@Anonymous % change of what? Value? change over month by each product? You post is not very clear. Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k 

This is a sale data report, thus referring to the percentage change of total sale compared to the previous FY.
in my case, the fiscal year start Apr. is it possible?
Can anyone advice?

dax
Community Support
Community Support

Hi mellyVK,

I create a column like below(you could refer to my  upload sample)

FinancialYearNo = 
IF (
AND (
'DATA1'[Date] >= DATE ( 2015, 4, 1 ),
'DATA1'[Date] <= DATE ( 2016, 3, 31 )
),
15, 

IF (
AND (
'DATA1'[Date] >= DATE ( 2016, 4, 1 ),
'DATA1'[Date] <= DATE ( 2017, 3, 31 )
),
16, 

IF (
AND (
'DATA1'[Date] >= DATE ( 2017, 4, 1 ),
'DATA1'[Date] <= DATE ( 2018, 3, 31 )
),
17, 

14)
))


Then create measures like below

current = CALCULATE(SUM(DATA1[Value]), ALLEXCEPT(DATA1,DATA1[Product],DATA1[FinancialYear]))
pre = CALCULATE(SUM(DATA1[Value]),FILTER( ALLEXCEPT(DATA1,DATA1[Product]) , DATA1[FinancialYearNo]=MIN(DATA1[FinancialYearNo])-1)) 
% change = if(ISBLANK([pre])|| [pre]=0 ,0,([current]-[pre])/[pre])

286.PNG

Best Regards,
Zoe Zhi

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

 

Anonymous
Not applicable

@dax 

Thanks so much!

by the way how about the % sign on the chart?

dax
Community Support
Community Support

Hi mellyVK,

You could set format like below for %change

 

311.PNG

In addition, for thr measures

current = CALCULATE(SUM(DATA1[Value]), ALLEXCEPT(DATA1,DATA1[Product],DATA1[FinancialYear])) 
// this calculate total based on product and year group
pre = CALCULATE(SUM(DATA1[Value]),FILTER( ALLEXCEPT(DATA1,DATA1[Product]) , DATA1[FinancialYearNo]=MIN(DATA1[FinancialYearNo])-1))
// DATA1[FinancialYearNo]=MIN(DATA1[FinancialYearNo])-1) filter year is previous year of current row, then calculate total
% change = if(ISBLANK([pre])|| [pre]=0 ,0,([current]-[pre])/[pre])

 

Best Regards,
Zoe Zhi

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

Anonymous
Not applicable

@dax 

hi, i am also trying to get it to compare previous fiscal Quarter over this fiscal Quarter.

I followed this video & got the quarter column

I adjusted the above forumla to QoQ, got it working for current QoQ,

but not able to display chart for previous qoq and %change.

can anyone advice?

Thank you.

Hi,

For the Previous Quarter, try this measure

=CALCULATE([your measure],PREVIOUSQUARTER(Calendar[Date]))


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.