Forum Discussion
rajendraongole1
4 years agoSuper User
Comparing the value with category
Hi,
I have created a table chart with category and sales value
| Category | sales |
| A | 800 |
| B | 400 |
| C | 500 |
| D | 600 |
want to compare my sales from B row category onwards.
Like as below:
| Category | sales | sales1 |
| A | 800 | |
| B | 400 | 800 |
| C | 500 | 400 |
| D | 600 | 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
- amitchandakSuper User
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])