Forum Discussion

I_miss_tableau's avatar
2 years ago
Solved

Exclude outliers based on numeric paramater

Hi, I am absolute beginner if it comes to Power BI (as my name says I used to use Tableau). I'm trying to create dashboard which exlude outlers based on user selection. User can choose value which he thinks it's too much for him and exclude all values above. 

Example below:

PersonSalesRegionParamater
a12APAC90
b68EMEA90
c45EMEA90
d89APAC90
e189AMER90
g34AMER90
h78AMER90
i7AMER90
j123AMER90
k45APAC90
l78APAC90
m78AMER90
n345EMEA90
o34EMEA90
p100EMEA90
r46EMEA90
s99APAC90
t67APAC90
u88EMEA90
w123AMER90
x100EMEA90
y90APAC90
z76APAC90

I managed to create paramater and selected 90 as an example. I want to create filter which exclude all people with  Sales values over selected value (in this case 90). I did it easily for table with people id but I want to implement it to other vizs. E.g. chart with regions only. Example

 

AMER: 197

APAC:  457

EMEA: 281

 

Aggregation after people with Sales over 90 were excluded. 

 

Please help, if you help me I will stop living in constant fear for Power BI because my tableau dahboard are mostly based on such paramaters (i need to migrate all of them from Tableau to PowerBI)

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi  I_miss_tableau 

     

    Try the following DAX

    Measure = CALCULATE(SUMX(FILTER('Table','Table'[Sales]<='Table'[Paramater]),'Table'[Sales]))

     

    This is the result you want

     

     

     

    Best Regards,

    Jayleny

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  I_miss_tableau 

     

    Try the following DAX

    Measure = CALCULATE(SUMX(FILTER('Table','Table'[Sales]<='Table'[Paramater]),'Table'[Sales]))

     

    This is the result you want

     

     

     

    Best Regards,

    Jayleny

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • I_miss_tableau's avatar
      I_miss_tableau
      Helper I

      Thank you again but I have another question. It helped but in my dashboard I have another measures and I want to exclude all persons which exceed outliers (filter them out from all calculations, if possible from whole database). For now it changes Sales>90 to 0 but if I want to have other measures like e.g. hours then I need to create other calculations. I wish to have column like Ex.outliers: trie/false and remove these people from my database. Hope it makes sense