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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

One "What if" parameter for each row in a column with cumulative sum

Is it possible to change each row of a column with "what if" parameter(Column C)?
I would like to have something like the picture below. My wished result for row 0 column C in this example would be 3535. And I would like to have one "what if" slider for each row.

 

I would also like to have a cumulative sum of every row. So if C[0] is 3535 in this case and the slider for C[1] is 0 I would like to have the result 6035 at C[1] and so on.

Skärmklipp1.JPG

Thanks in advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,@Anonymous 

 

First,you can create an index table.

then create a measure like this to meet your needs:

 

Measure = 
SWITCH(SELECTEDVALUE('Table'[Index]),
1,
CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date])))+'Parameter'[Parameter Value],
2,
CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date])))+'Parameter'[Parameter Value]+'Parameter1'[Parameter1 Value],
3,
CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date])))+'Parameter'[Parameter Value]+'Parameter1'[Parameter1 Value]+'Parameter2'[Parameter2 Value],
4,
CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date])))+'Parameter'[Parameter Value]+'Parameter1'[Parameter1 Value]+'Parameter2'[Parameter2 Value]+'Parameter3'[Parameter3 Value])

 

 

 

New Price = SUMX(VALUES('Table'[Date]),'Table'[Measure])

 

 

0113.png

 

Here is the demo , please try it: https://qiuyunus-my.sharepoint.com/:u:/g/personal/admin_qiuyunus_onmicrosoft_com/EXZRdw5LGR5Jpjn079Q9G9wB9CJV-3BMb6zS1baD19zeiw?e=EnLd46

 

Hope it helps.

 

Best Regards,

Caitlyn Yan

 

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

Hi,@Anonymous 

 

First,you can create an index table.

then create a measure like this to meet your needs:

 

Measure = 
SWITCH(SELECTEDVALUE('Table'[Index]),
1,
CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date])))+'Parameter'[Parameter Value],
2,
CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date])))+'Parameter'[Parameter Value]+'Parameter1'[Parameter1 Value],
3,
CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date])))+'Parameter'[Parameter Value]+'Parameter1'[Parameter1 Value]+'Parameter2'[Parameter2 Value],
4,
CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date])))+'Parameter'[Parameter Value]+'Parameter1'[Parameter1 Value]+'Parameter2'[Parameter2 Value]+'Parameter3'[Parameter3 Value])

 

 

 

New Price = SUMX(VALUES('Table'[Date]),'Table'[Measure])

 

 

0113.png

 

Here is the demo , please try it: https://qiuyunus-my.sharepoint.com/:u:/g/personal/admin_qiuyunus_onmicrosoft_com/EXZRdw5LGR5Jpjn079Q9G9wB9CJV-3BMb6zS1baD19zeiw?e=EnLd46

 

Hope it helps.

 

Best Regards,

Caitlyn Yan

 

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

Anonymous
Not applicable

Thank you for answering @amitchandak, but I can't get your measure to work.

I've tried this based on the  first picture below:

 

Measure = CALCULATE( SUM ('Table'[Price]) , FILTER( 'Table', [Date] = TODAY() )) + Parameter[Parameter Value]

 

Column "New price(Measure)" is my wished result, but column  "Measure" is what I get. And since I am not allowed to put the Parameter value inside CALCULATE it adds this values to every row.

 

My wished result = Measured value on the row above + Table[Price] on row + Parameter value to this raw (There is one parameter value for each row) 

 
 
Skärmklipp6.JPG
 
I can do the Table like this picture below if it makes it easier to solve my problem?
 
Skärmklipp5.JPG
 
 
amitchandak
Super User
Super User

@Anonymous , based on what I got

Try a measure like

Measure = calculate(sum(Table[B]), filter(Allselected(Table), Table[A] <= Max(Table[A]))) + selectedvalue(Whatif[Parameter])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.