Forum Discussion

shakirkhanani's avatar
8 years ago

Filter Transactions into Max and Min

Dear BI Champs,

 

I need help in sorting the following Transactions into Max and Min based on Qty and Total of a particular day / week / month:

 

 

Table:

 

Transactions  Item Name Qty Price Total Date

1                    Car                1     10    10   16 Feb 2018

1                    Plane             1     20    20   16 Feb 2018

2                    Bike               2      5     10   16 Feb 2018

3                    Car                1     10    10   16 Feb 2018

3                    Boat              2     20    40   16 Feb 2018

 

Thanking in advance.....

 

Regards,

M Shakir

2 Replies

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi shakirkhanani,

     

    Could you please illustrate "sorting the following Transactions into Max and Min based on Qty and Total of a particular day / week / month" with examples?

     

    Based on above sample table, what is your desired output?

     

    Below is the result I have got based on my assumption.

    Create two calculated columns

    Rank = RANKX(Table_1,Table_1[Total],,DESC,Dense)
    
    Min/Max =
    IF (
        Table_1[Rank] = 1,
        "Max",
        IF ( Table_1[Rank] = MAX ( Table_1[Rank] ), "Min", BLANK () )
    )

     

    Regards,

    Yuliana Gu