Forum Discussion
Laufer_Israel
Helper I
6 years agoReturns only first row with lookupvalue
Hi all, I have a table as can be seen below and I would like to see only the first row for "Total sales 2018" column. It is important to note that "Total sales 2018" is a data which has been taken ...
Laufer_Israel
Helper I
6 years agoThe right column it is what I am looking for.
| Code | Name | Product | Quantity | Total sales 2018 | Total sales 2018 |
| 1 | One | PP | 2 | 220 | 220 |
| 1 | One | SS | 3 | 220 | |
| 1 | One | YY | 4 | 220 | |
| 1 | One | MM | 9 | 220 | |
| 2 | Two | PP | 1 | 167 | 167 |
| 2 | Two | SS | 4 | 167 | |
| 2 | Two | YY | 7 | 167 | |
| 2 | Two | MM | 2 | 167 | |
| 3 | Three | PP | 3 | 701 | 701 |
| 3 | Three | SS | 1 | 701 | |
| 3 | Three | YY | 3 | 701 | |
| 3 | Three | MM | 8 | 701 |
v-xicai
Community Support
6 years agoHi Laufer_Israel ,
You can create columns like DAX below.
Rank = CALCULATE(COUNT(Table1[Code]),FILTER(Table1, Table1[Code]<=EARLIER(Table1[Code])))
Total sales 2018_New=IF([Rank]=1, [Total sales 2018], BLANK())
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.