Search code examples
powerbidaxdata-analysispowerbi-desktopmeasure

Aggregate values by a distinct identifier in Power BI using DAX


Here my table: enter image description here

When I create a summed table by group_no I have below table in Power BI:

enter image description here

However, this is what I would like to have:

enter image description here

So, what I would like to get is total revenue by unique project_no on Groups (group_no).


Solution

  • Here you go:

    enter image description here

    aggregated_revenue = 
    VAR tbl = SUMMARIZE('Table', 'Table'[project_no], 'Table'[revenue])
    RETURN SUMX(tbl, 'Table'[revenue] )