Forum Discussion

rajendraongole1's avatar
rajendraongole1
Super User
4 years ago
Solved

Comparing the value with category

Hi,

 

I have created a table chart with category and sales value

 

Categorysales
A800
B400
C500
D600

 

 

want to compare my sales from B row category onwards.

 

Like as below:

 

Categorysalessales1
A800 
B400800
C500400
D600

500

 

 

any suggestion. please help

  • rajendraongole1 , Hope the are in sortable order, Other wise add an index column in power query and use same formula on index instead of category

     

    New column =

    var _max = maxx(filter(Table, [Category] < earlier([Category]) ) ,[Category])

    return

    maxx(filter(Table, [Category] =_max ) ,[sales])

1 Reply

  • rajendraongole1 , Hope the are in sortable order, Other wise add an index column in power query and use same formula on index instead of category

     

    New column =

    var _max = maxx(filter(Table, [Category] < earlier([Category]) ) ,[Category])

    return

    maxx(filter(Table, [Category] =_max ) ,[sales])