Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
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.
Solved! Go to Solution.
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] ) )
)
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
)
)
Brilliant! How can I further expand to show the Total Amount of the Measured Receipt No.
Its there in the variable of the above MEASURE
MaxAmount =
MAXX (
ALLSELECTED ( Table1[Receipt No.] ),
CALCULATE ( SUM ( Table1[Amount] ) )
)
Genius, at least to me. I wasted the half of my Sunday figuring this out. Thanks again dear Zohaib. Appreicate if you could share some pointers to me to improve by BI.
Don't worry ......With time you will get to grip with Power BI.....
Here are some tips ![]()
1) Start solving the problems in this forum
2) Read the books...Following are some good books
Learn to Write DAX: A practical guide to learning Power Pivot for Excel and Power BI
M Is for (Data) Monkey: A Guide to the M Language in Excel Power Query
Also subscribe to following Power BI blogs and sites... and follow the posts/articles published there
www.powerpivotpro.com by @avisingh and Rob Collie
www.daxpatterns.com by @AlbertoFerrari and @marcorusso
www.sqlbi.com by abovegentlmen
https://exceleratorbi.com.au/exceleratorblog/ by @MattAllington
https://www.excelguru.ca/blog/ by @KenPuls
http://www.ashishmathur.com/knowledge-base/ by @Ashish_Mathur
Thank you so much Zohaib for the tips and the books, will definitely check them out.
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 53 | |
| 42 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 123 | |
| 104 | |
| 44 | |
| 32 | |
| 24 |