79807060

Date: 2025-11-02 10:23:31
Score: 1
Natty:
Report link

Easy enough,

First, create a measure named "SUM Amount",
SUM Amount = SUM( 'DATATABLE'[Amount] )

then,

_Amount =
VAR __r =
    RANK(
        ALLSELECTED( 'DATATABLE'[State], 'DATATABLE'[Company] ),
        ORDERBY( [SUM Amount], DESC, 'DATATABLE'[Company], DESC ),
        PARTITIONBY( 'DATATABLE'[State] )
    )
RETURN
    IF( __r <= 3, [SUM Amount] )

enter image description here

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: ThxAlot