Forum Discussion

ngct1112's avatar
ngct1112
Icon for Post Patron rankPost Patron
6 years ago

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

  • Anonymous's avatar
    Anonymous
    Not 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!

     

    • ngct1112's avatar
      ngct1112
      Icon for Post Patron rankPost 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

       

       

       

       

      • Anonymous's avatar
        Anonymous
        Not 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