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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
JiaJie
New Member

Creating Cumulative What If Line

Hi,

 

I am currently trying to create a cumulative what if line which can be adjusted by the user on a slicer when a what if parameter is created. I have created a what if line but is currently horizontal despite creating a new rolling total meausure.

 

Does anyone knows how to create cumulative what if parameter line? 

 

An example of what I am looking for to create:

JiaJie_1-1638955753706.png

 

Currently:

JiaJie_2-1638956044325.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @JiaJie ,

Here are the steps you can follow:

1. In Power query, Add Column – Index Column From 1.

vyangliumsft_0-1639447450338.png

2. In Modeling – New parameter.

Minimum = 5

Maximum = 45

Increment = 5

vyangliumsft_1-1639447450341.png

3. Create calculated column.

Index = RANKX('Parameter','Parameter'[Parameter],,ASC)

vyangliumsft_2-1639447450343.png

4. Create the relationship between the two tables with [Index]

vyangliumsft_3-1639447450345.png

5. Result:

vyangliumsft_4-1639447450350.png

 

Best Regards,

Liu Yang

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  @JiaJie ,

Here are the steps you can follow:

1. In Power query, Add Column – Index Column From 1.

vyangliumsft_0-1639447450338.png

2. In Modeling – New parameter.

Minimum = 5

Maximum = 45

Increment = 5

vyangliumsft_1-1639447450341.png

3. Create calculated column.

Index = RANKX('Parameter','Parameter'[Parameter],,ASC)

vyangliumsft_2-1639447450343.png

4. Create the relationship between the two tables with [Index]

vyangliumsft_3-1639447450345.png

5. Result:

vyangliumsft_4-1639447450350.png

 

Best Regards,

Liu Yang

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

amitchandak
Super User
Super User

@JiaJie , a measure like

 


Countx(filter(allselected(Table), Table[shift_info] <=max(Table[shift_info] ) ),Table[shift_info] ) *5

 

or

 

Countx(filter(allselected(Table), Table[shift_info] <=max(Table[shift_info] ) ),Table[shift_info] ) * [what if measure]

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

Hi  @amitchandak,

 

I have tried using your CountX method however it is counting the number of shift info multiplying the what if.

 

However I am looking to just create a Y=MX line M is the what if number. I have tried to create a distinct table of shift info and rank it follow by muktiplying the what if. But it is still giving me a flat line. 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.