Forum Discussion

Fidzi8's avatar
Fidzi8
Icon for Helper V rankHelper V
5 years ago
Solved

Priority

Hi, I need a advice.   I need in PBI create new column where will be result column "F".   Column "F" (Priority) is RATING according to minimum Haulier price (column "D"). But when column "E" (D...
  • mahoneypat's avatar
    5 years ago

    Here is a column expression that shows one way to do it.  Just replace Price with your actual table name.

     

    Priority =
    VAR vThisCode = 'Price'[Code]
    VAR vThisPrice = 'Price'[Haulier price]
    VAR vRank =
        RANKX (
            SUMMARIZE (
                FILTER ( 'Price', 'Price'[Code] = vThisCode ),
                'Price'[Haulier price]
            ),
            'Price'[Haulier price],
            vThisPrice,
            ASC
        )
    RETURN
        IF ( 'Price'[Destination exclusivity] = 11vRank )

     

    Pat