Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon'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.
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:
ID | Profit | Profit % | Pass % |
1 | 10 | 2% | 10% |
2 | 5 | 4% | 40% |
3 | 2 | 5% | 22% |
4 | 6 | 1% | 1% |
5 | 12 | 24% | 50% |
6 | 1 | 1% | 20% |
7 | 66 | 58% | 3% |
8 | 5 | 4% | 20% |
9 | 1 | 1% | 3% |
10 | 0 | 0% | 55% |
11 | 45 | 12% | 40% |
12 | 45 | 12% | 56% |
13 | 0 | 0% | 2% |
14 | 5 | 5% | 6% |
15 | 8 | 6% | 10% |
Thanks
@ngct1112 , Check what-if parameter can help
https://docs.microsoft.com/en-us/power-bi/desktop-what-if
@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%))
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
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!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
124 | |
79 | |
49 | |
38 | |
38 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |