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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
eunji888888
Frequent Visitor

let the user to manually change the measure formula in Power BI using filter or slicer

I have a column called claim that have below formula:

=IF(AND(SUM(G40:M40)>=2),SUMPRODUCT($G$8:$M$8,G40:M40),0)   ------(1) =IF(AND(SUM(G40:M40)>=1),SUMPRODUCT($G$8:$M$8,G40:M40),0)  ------(2)

 

Most of the formula in that rows are the (1), but some of them are (2). This is because the user need to manually change the formula into >=1 for some special case.

 How could i let the user to manually change the measure formula in Power BI for this purpose. Below is my current thinking but still not work

 

claim=
VAR SelectedThreshold = SELECTEDVALUE('Thresholds'[Threshold], 1)  -- Default to 1 if nothing is selected
RETURN
SUMX(
    FILTER(
        'Table',
        LEFT('Table'[Reason Description], 2) <> "GR" &&
        'Table'[*NetCase] >= SelectedThreshold
    ),
    'Table'[*NetCase] * 'Table'[number2]
)

 

1 REPLY 1
dk_dk
Super User
Super User

Hi @eunji888888 

This should be possible with a Numeric Range parameter. It seems like you tried to implement something similar with SELECTEDVALUE. If you can provide more details on what error you get, or what result you get vs your expected result, maybe I can help more. If possible, try to attach some sample data.


Best regards,

Daniel




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.