Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
shakirkhanani
Helper I
Helper I

Highest 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 CodeTimePriceQtyAmount
20180323000114100002782018-03-23 12:39:55249.001.00249.00
20180323000110130001942018-03-23 12:39:55369.001.00369.00
20180323000110130001952018-03-23 12:39:55369.001.00369.00
20180323000116110017882018-03-23 12:39:55749.001.00749.00
20180323000214100002782018-03-23 12:42:44249.001.00249.00
20180323000210130001942018-03-23 12:42:44369.001.00369.00

 

Thanks in advance.

2 ACCEPTED SOLUTIONS
Zubair_Muhammad
Community Champion
Community Champion

Hi @shakirkhanani

 

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
        )
    )

View solution in original post

Hi @shakirkhanani

 

Its there in the variable of the above MEASURE

 

MaxAmount =
MAXX (
    ALLSELECTED ( Table1[Receipt No.] ),
    CALCULATE ( SUM ( Table1[Amount] ) )
)

 

 

View solution in original post

7 REPLIES 7
Zubair_Muhammad
Community Champion
Community Champion

Hi @shakirkhanani

 

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. 

Hi @shakirkhanani

 

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.

Thank you so much Zohaib for the tips and the books, will definitely check them out.  

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.