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

Increase amount on every row

Maybe there is a easy way to add this measure. I've been trying to increase the amount on every row from 2020 onwards (every amount will be added to the previous result). I've been trying different measures but cannot get the right results. 

 

The result I've been looking for would be something like this table:

 

Date- Amount- Calc amount
01-01-2019- 10001000
02-01-2019- 20002000
01-01-2020- 10001000
02-01-2020- 20003000
03-02-2020- 20005000

 

1 ACCEPTED SOLUTION
v-yuaj-msft
Community Support
Community Support

Hi @Anonymous ,

 

Based on your description, you can create a measure as follows.

calculated_measure =

var x1=CALCULATE(

    SUM('Table1'[- Amount]),

    FILTER(ALL('Table1'),'Table1'[Date].[Year]=2020&&'Table1'[Date]<=MAX('Table1'[Date])))

return

IF(MAXX('Table1','Table1'[Date].[Year])=2020,x1,MAX('Table1'[- Amount]))


Result:

v-yuaj-msft_0-1606696816420.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

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

Thanks for the help, this measure helped

v-yuaj-msft
Community Support
Community Support

Hi @Anonymous ,

 

Based on your description, you can create a measure as follows.

calculated_measure =

var x1=CALCULATE(

    SUM('Table1'[- Amount]),

    FILTER(ALL('Table1'),'Table1'[Date].[Year]=2020&&'Table1'[Date]<=MAX('Table1'[Date])))

return

IF(MAXX('Table1','Table1'[Date].[Year])=2020,x1,MAX('Table1'[- Amount]))


Result:

v-yuaj-msft_0-1606696816420.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

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

BA_Pete
Super User
Super User

Hi @Anonymous ,

 

You can add a column in Power Query with this code:

if Date.Year([Date]) >= 2020 then [Amount] + 1000 else [Amount]

 

Pete 



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




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.