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

Calculation based on a parameter

Hi, 

 

I'm trying to create a calculation based on a what if parameter, presented using a slicer. 

 

The parameter (X) will take any value between 1 to 100. 

winnieyan_0-1622644565729.png

winnieyan_2-1622646863171.pngwinnieyan_3-1622646901018.png

 

There are four columns in the existing table: 

- customer name 

- current compliance level

- average sales per case

- annual target case

 

The calculation I'm trying to do is as follows:

 

Find the total revenue increase if every customer in the table increases its compliance level by X (%).

 

Total revenue increase = X * table[annual target case] * table[avg sales per case] 

 

The complication is that compliance level can't go over 100%, so I need to build in a condition that if an increase in X makes the customer's compliance level > 100%, then Total revenue increase = (100% - table[current compliance level]) * table[annual target case] * table[avg sales per case] 

 

I've tried using IF statement, MINX, measure, or calculated columns, but none of them worked, and there is the lack of interaction between the slicer and the columns that I've created. 

 

For example this simple IF statement I've created for a column failed to interact with the total revenue increase when I move the slicer.  

winnieyan_1-1622646671710.png

 

Also tried this query, which didn't work either. 

winnieyan_4-1622647062160.png

 

 

Any idea where I got wrong or any support is greatly appreciated! 

 

Thanks in advance! 

 

 

 

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

Hi @Anonymous ,

 

You can use measure like bleow:

 

Measure = IF (
    MAX ( Table[current compliance level] ) + [perc_compliance Value] > 1,
    ( 1 - MAX ( Table[current compliance level] ) ) * Table[annual target case] * Table[avg sales per case],
    [perc_compliance Value] * Table[annual target case] * Table[avg sales per case]
)

 

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

 

Best Regards,

Dedmon Dai

View solution in original post

1 REPLY 1
v-deddai1-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can use measure like bleow:

 

Measure = IF (
    MAX ( Table[current compliance level] ) + [perc_compliance Value] > 1,
    ( 1 - MAX ( Table[current compliance level] ) ) * Table[annual target case] * Table[avg sales per case],
    [perc_compliance Value] * Table[annual target case] * Table[avg sales per case]
)

 

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

 

Best Regards,

Dedmon Dai

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.