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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.