Forum Discussion

Varshi288's avatar
Varshi288
Icon for Resolver II rankResolver II
4 years ago
Solved

Percentile group Category

 

Hello Group,

I have three Percetail columns like 30, 50 & 65th Percentiles for frame size. I also have another table with Catagory (Gold Silver & Bronze). I want to calculate attractiveness based on logic.

 

Attractiveness If 65th percentile > Gold --> Attractiveness = High
ELSE, If 30th Percentile > Bronze --> Attractiveness = Average
ELSE, --> Attractiveness = Low

 

Customers30th Percentile50th Percentile65th Percentile     

16845 $846 $846 $
18952 $2,140 $3,210 $
201,280 $1,320 $1,398 $
221,999 $2,141 $2,141 $
252,567 $2,567 $2,567 $
315,309 $5,309 $5,309 $
FrameFrame SizeBronzeSilverGold
556118118118
663141151177
771131149173
880217257297
990263300321
10100332410457
11112421436502
13132524650724
161601,0151,1721,364
181801,1741,4901,725
202001,9252,3052,567
222252,6782,9913,282
252503,2673,5153,964
282803,5265,2176,350
313155,4966,9678,529
3535512,93215,68018,182
4040026,60231,78238,655
4545045,33852,13159,338

 

 

Output.

 

  • Hi  Anonymous 

     

    Thanks  for the reply. Acutually the percentile values are measures and this achieved by using variables.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Varshi288 ,

    Table 1.

    Table 2.

    Please create a relationship first.

    If you want a calculated column.

    Attractiveness = 
    SWITCH(
        TRUE(),
       CALCULATE(MAX('Table 1'[65th Percentile]))>CALCULATE(MAX('Table 2'[Gold])),"High",
       CALCULATE(MAX('Table 1'[30th Percentile]))>CALCULATE(MAX('Table 2'[Bronze])),"Average",
        "Low")

    Or a measure.

    Measure = 
    SWITCH(
        TRUE(),
        MAX('Table 1'[65th Percentile])>MAX('Table 2'[Gold]),"High",
        MAX('Table 1'[30th Percentile])>MAX('Table 2'[Bronze]),"Average",
        "Low")

    Attach the PBIX file for reference. Hope it helps.

     

    If this doesn't work for you or I misunderstand your needs, please consider sharing more details about it. And it would be great if there was a sample file without any sensitive information here.

     

    It makes it easier to give you a solution.

    1. Sample (dummy dataset) data as text, use the table tool in the editing bar.
    2. Expected output from sample data.
    3. Explanation in words of how to get from 1. to 2.

     

    Best Regards,
    Community Support Team_Gao

     

    If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly -- How to provide sample data

  • Hi  Anonymous 

     

    Thanks  for the reply. Acutually the percentile values are measures and this achieved by using variables.