Forum Discussion
shakirkhanani
Helper I
8 years agoHighest Basket (Receipt) Value
Hello,
I need help in trying to find the highest / Max "Receipt No." baesd on the "Amount" as per the below Data Table:
| Receipt No. | Goods Code | Time | Price | Qty | Amount |
| 201803230001 | 1410000278 | 2018-03-23 12:39:55 | 249.00 | 1.00 | 249.00 |
| 201803230001 | 1013000194 | 2018-03-23 12:39:55 | 369.00 | 1.00 | 369.00 |
| 201803230001 | 1013000195 | 2018-03-23 12:39:55 | 369.00 | 1.00 | 369.00 |
| 201803230001 | 1611001788 | 2018-03-23 12:39:55 | 749.00 | 1.00 | 749.00 |
| 201803230002 | 1410000278 | 2018-03-23 12:42:44 | 249.00 | 1.00 | 249.00 |
| 201803230002 | 1013000194 | 2018-03-23 12:42:44 | 369.00 | 1.00 | 369.00 |
Thanks in advance.
Try this MEASURE
Measure = VAR MaxAmount = MAXX ( ALLSELECTED ( Table1[Receipt No.] ), CALCULATE ( SUM ( Table1[Amount] ) ) ) RETURN CALCULATE ( FIRSTNONBLANK ( Table1[Receipt No.], 1 ), FILTER ( ALLSELECTED ( Table1[Receipt No.] ), CALCULATE ( SUM ( Table1[Amount] ) ) = MaxAmount ) )Its there in the variable of the above MEASURE
MaxAmount = MAXX ( ALLSELECTED ( Table1[Receipt No.] ), CALCULATE ( SUM ( Table1[Amount] ) ) )
7 Replies
- Zubair_Muhammad
Community Champion
Try this MEASURE
Measure = VAR MaxAmount = MAXX ( ALLSELECTED ( Table1[Receipt No.] ), CALCULATE ( SUM ( Table1[Amount] ) ) ) RETURN CALCULATE ( FIRSTNONBLANK ( Table1[Receipt No.], 1 ), FILTER ( ALLSELECTED ( Table1[Receipt No.] ), CALCULATE ( SUM ( Table1[Amount] ) ) = MaxAmount ) )- shakirkhanani
Helper I
Brilliant! How can I further expand to show the Total Amount of the Measured Receipt No.
- Zubair_Muhammad
Community Champion
Its there in the variable of the above MEASURE
MaxAmount = MAXX ( ALLSELECTED ( Table1[Receipt No.] ), CALCULATE ( SUM ( Table1[Amount] ) ) )