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

How to make a row in a certian column start in the negative and add a constant value at each new row

Hi All,
Very new to PowerBI and I have been stuck on this problem for a while now. I'm trying to make it so Day 0 starts at -5,000 and with each additional day, $1500 is added to the -5000. So day 1 would be -3500, day 2 -2000, day 3 -500, day 4 1000 and so on. Both columns circled in Red are measures created from a slicer.
 
Capture.JPG
 
I am eventually wanting this to be graphed out in a line graph.
Am I going about this right? Is there an easier or more effective method of achieving what I am trying to achieve? Should I be creating a new table for this instead? Or is there really no way of achieving this?
It is also important to note that the slicer measures E-Bin cost and Profit (Day) are also influenced by other slicers - if that adds any more additional information.
 
Thank you for reading 🙂
1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @Anonymous 

 

Try this measure:

 

Measure = 
Var _R = max(table[day])
return
[E-Bin Cost]+(_R*1500)



or 


Measure = 
Var _R = max(table[day])
return
[E-Bin Cost]+(_R*[Profit (day)])

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

View solution in original post

4 REPLIES 4
VahidDM
Super User
Super User

Hi @Anonymous 

 

Try this measure:

 

Measure = 
Var _R = max(table[day])
return
[E-Bin Cost]+(_R*1500)



or 


Measure = 
Var _R = max(table[day])
return
[E-Bin Cost]+(_R*[Profit (day)])

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

Anonymous
Not applicable

Hi @VahidDM 

It does not appear to be accepting this DAX code as a new measure. Any thoughts? Or am I inputting this in the wrong place? 

Capture.JPG

@Anonymous 

 

The RETURN missed from my code.

 

Make sure you copy and past code.

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

Anonymous
Not applicable

Ah yes! 

 

@VahidDM it has indeed worked thank you very much, deeply appreciative! 

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.