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 ...
- 8 years ago
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 ) ) - 8 years ago
Its there in the variable of the above MEASURE
MaxAmount = MAXX ( ALLSELECTED ( Table1[Receipt No.] ), CALCULATE ( SUM ( Table1[Amount] ) ) )
Zubair_Muhammad
Community Champion
8 years ago
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
)
)
- shakirkhanani8 years ago
Helper I
Brilliant! How can I further expand to show the Total Amount of the Measured Receipt No.
- Zubair_Muhammad8 years ago
Community Champion
Its there in the variable of the above MEASURE
MaxAmount = MAXX ( ALLSELECTED ( Table1[Receipt No.] ), CALCULATE ( SUM ( Table1[Amount] ) ) )- shakirkhanani8 years ago
Helper I
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.