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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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 Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors