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
ngct1112
Post Patron
Post Patron

BI Desktop Parameter with Columns

Hi, I would like to create a parameter as a master slicer to control the page in BI

Is it possible I could have a slicer to select 2 columns - 1."Profit%" or  2."Pass%" to influence the measure like

measure = CALCULATE(SUMX('Table','Table'[Profit]),FILTER('Table','Table'[PARAMETER_COLUMN]=>5%

 

Here is the dataset I have:

IDProfitProfit %Pass %
1102%10%
254%40%
325%22%
461%1%
51224%50%
611%20%
76658%3%
854%20%
911%3%
1000%55%
114512%40%
124512%56%
1300%2%
1455%6%
1586%10%

 

Thanks

4 REPLIES 4
amitchandak
Super User
Super User

@ngct1112 , Check what-if parameter can help

https://docs.microsoft.com/en-us/power-bi/desktop-what-if

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

@amitchandak @harshnathani 
But is it possible I could have a parameter not a Number range but Text(Columns).

I find it I could not put the text into the What-if parameter somehow.

 

With the measure, the measure could be dynamically changed with the parameter, making the formula like that when I choose on the slicer,

measure = CALCULATE(SUMX('Table','Table'[Profit]),FILTER('Table','Table'[PARAMETER_COLUMN]=>5%))

--> measure = CALCULATE(SUMX('Table','Table'[Profit]),FILTER('Table','Table'[Pass%]=>5%))
--> measure = CALCULATE(SUMX('Table','Table'[Profit]),FILTER('Table','Table'[Profit%]=>5%))

 

 

Parameter.JPG

 

Great thanks if there are any advices

 

 

 

 

Hi @ngct1112 ,

The what-if parameter can only be used for numeric data. Can I know what's the final result you want? Is the data filter by the slicer for (Profit %>5% || Pass %>50) or (Profit %>50 && Pass %>50)? And what are the text parameters you mentioned? That is from the fact field in table or a measure?

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
harshnathani
Community Champion
Community Champion

Hi @ngct1112 ,

 

Not very clear on what is the final output.

 

You can have 2 slicers as Profit% and Pass% (incase they are columns of your table). 

You cannot have measures as slicers.

 

You can try

 

 

measure =
CALCULATE (
    SUM ( 'Table'[Profit] ),
    FILTER (
        'Table',
        'Table'[PARAMETER_COLUMN] >= "5%"
    )
)

 

 


Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

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

 

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.