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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

what if parameter problem

i want to create a measure using with "what if" parameter with sumx function but i'm getting memory error. how can convert this function. And how can i get the results without using sumx function?

 

SUMX(Daily[NETSPEND],SWITCH(TRUE(),Daily[NETSPEND]=0,0,Daily[NETSPEND]+'PriceIncrease'[PriceIncrease]))

 

My Table consists of 20 columns and 5M+ rows.

 

Best.

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

Hi, @Anonymous 

According to your description, I can roughly understand what you want to get, I’ve also created some test data and create a measure to achieve this, you take a look at my steps and find if it’s useful:

This is my test data:

v-robertq-msft_0-1614309550803.png

 

I created What-if parameter and apply a Slicer on the page, then I created a measure, because calculated column can not be affected by the selection of a slicer:

Measure =

IF(

    MAX([NETSPEND])=0,

    0,

    SUMX('Daily',[NETSPEND]+[Parameter Value]))

Then I created a table chart and place them, this measure can run properly, like this:

v-robertq-msft_1-1614309550816.png

 

You can download my test pbix file here

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result so that we can help you in advance.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

1 REPLY 1
v-robertq-msft
Community Support
Community Support

Hi, @Anonymous 

According to your description, I can roughly understand what you want to get, I’ve also created some test data and create a measure to achieve this, you take a look at my steps and find if it’s useful:

This is my test data:

v-robertq-msft_0-1614309550803.png

 

I created What-if parameter and apply a Slicer on the page, then I created a measure, because calculated column can not be affected by the selection of a slicer:

Measure =

IF(

    MAX([NETSPEND])=0,

    0,

    SUMX('Daily',[NETSPEND]+[Parameter Value]))

Then I created a table chart and place them, this measure can run properly, like this:

v-robertq-msft_1-1614309550816.png

 

You can download my test pbix file here

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result so that we can help you in advance.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.