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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

How to create a protiftability line chart in %?

Sorry if this is a dumb question, but I've been studying Power BI and I am quite lost. I would like to build a profitability line chart, where my X axis is a date, my Y axis (values) is a percentage of increase, and my legend is a name. I will use an example of stock prices:

 

Id Name Date Value

1ABC22/07/201910.37
2F122/07/20191.99
3ABC23/07/201910.42
4F123/07/20192.07

 

If I plot the table above, the value of stock ABC is much higher than F1, so the lines will not be easily comparable. It is usual, in such scenario, to plot the profitability in % of these stocks.

 

image.png

 

How do I achieve this? Thanks in advance

1 ACCEPTED SOLUTION
richbenmintz
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

Assuming that your data looks like your sample the following formula should work.

 

Change from Prior = divide(sum('Table1'[Value]), 
CALCULATE(sum(Table1[Value]), 
-- remove Data filter context on x axis
FILTER(ALL(Table1[Date]), 
-- get record for prior date
'Table1'[Date] = DATEADD(VALUES(Table1[Date]), -1, DAY))), 
--set divide by zero value to 1 to ensure that the -1 one part of the equation does not return -100% when denom is 0
1)-1

I hope this helps,

 

Richard



I hope this helps,
Richard

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

Proud to be a Super User!


View solution in original post

1 REPLY 1
richbenmintz
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

Assuming that your data looks like your sample the following formula should work.

 

Change from Prior = divide(sum('Table1'[Value]), 
CALCULATE(sum(Table1[Value]), 
-- remove Data filter context on x axis
FILTER(ALL(Table1[Date]), 
-- get record for prior date
'Table1'[Date] = DATEADD(VALUES(Table1[Date]), -1, DAY))), 
--set divide by zero value to 1 to ensure that the -1 one part of the equation does not return -100% when denom is 0
1)-1

I hope this helps,

 

Richard



I hope this helps,
Richard

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

Proud to be a Super User!


Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.