Forum Discussion
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:
| 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
4 Replies
- AnonymousNot applicable
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!
- amitchandak
Super User
ngct1112 , Check what-if parameter can help
- ngct1112
Post Patron
amitchandak Anonymous
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
- AnonymousNot applicable
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