Forum Discussion

Camillanaep's avatar
Camillanaep
Frequent Visitor
8 years ago
Solved

Dynamic calculate Measure value based on Slicer Selection

Hello everybody!

 

 

I have a query on my BI wich contains the columns:

 

Name of owner    Error      Situation

Paul                       1,0%

Maria                     5,4%

Laura                     2,1%

Pedro                    1,4%

Louis                     0,6%

 

This column "Situation" is a condicional column that tells me if this error is "OK" or "NOT OK". >>> If(Error>X; "Not OK"; "OK")

 

But sometimes this X (acceptable error) is 5%, sometimes is 4%, sometimes is 3%, sometimes is 2% and sometimes is 1%. 

 

So, i need to create a slicer with this values of X (5%, 4%, 3%, 2%, 1%), and when i click, for example, in 5%, my  situation column tells me if the Error is OK or NOT OK.

 

Can somebody help me?

 

  • Hi Camillanaep,

    Please create your table ( I called mine Selection) and then create this measure in your main table (Pourcen):Pourc 

     

    Pourc = var Test = if(HASONEVALUE(Selection[Type]),MIN(Selection[Type]),BLANK())
    return 
    IF(MIN(Data[Error])>Test,"OK","NOT OK")

    Check image below:

     

    Ninter

8 Replies

  • Hi Camillanaep,

    Please create your table ( I called mine Selection) and then create this measure in your main table (Pourcen):Pourc 

     

    Pourc = var Test = if(HASONEVALUE(Selection[Type]),MIN(Selection[Type]),BLANK())
    return 
    IF(MIN(Data[Error])>Test,"OK","NOT OK")

    Check image below:

     

    Ninter

    • Camillanaep's avatar
      Camillanaep
      Frequent Visitor

      Interkoubess

       

      But now, as it is a measure, i'm not able to create a graph with my results of "Pourc". Do you have any idea of how can i use this new information to create a graph? (Like a pizza chart with "Count of Pourc", that changes when i change my filter of pourcentage)

       

      Thank you!