Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
88 | |
68 | |
61 |
User | Count |
---|---|
152 | |
120 | |
102 | |
87 | |
68 |