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
kala2
Helper III
Helper III

Distinct and Sum multiple columns

I want to distinct rows and the sum each row certain columns:

 

kala2_0-1627637873717.png

 

So i want to distinct the rows by Projekt ID and then sum the columns:

OFFEN - in Verzug

OFFEN - planmäßig

OFFEN - Start überfällig

IN ARBEIT - in Verzug

IN ARBEIT - planmäßig,

ABGESCHLOSSEN

 

I have this measure now for one column: 

 

SumDistinctPT = SUMX(DISTINCT('Table'[Projekt ID]), FIRSTNONBLANK('Table'[ABGESCHLOSSEN], 0))
which returns 24 result correctly

Expected sum to return for all distincted rows is: 133 (Sum of all distincted rows of the specific columns)
 
Any ideas how to distinct and sum multiple columns?
 
1 ACCEPTED SOLUTION
ebeery
Memorable Member
Memorable Member

Hi @kala2, how about something like the below.

SumDistinctAllColumns =
VAR _DistinctTable =
    SUMMARIZECOLUMNS (
        [OFFEN - in Verzug],
        [OFFEN - planmäßig],
        [OFFEN - Start überfällig],
        [IN ARBEIT - in Verzug],
        [IN ARBEIT - planmäßig],
        [ABGESCHLOSSEN]
    )
VAR _Result =
    SUMX (
        _DistinctTable,
        [OFFEN - in Verzug] + [OFFEN - planmäßig] + [OFFEN - Start überfällig] + [IN ARBEIT - in Verzug] + [IN ARBEIT - planmäßig] + [ABGESCHLOSSEN]
    )
RETURN
    _Result

View solution in original post

2 REPLIES 2
ebeery
Memorable Member
Memorable Member

Hi @kala2, how about something like the below.

SumDistinctAllColumns =
VAR _DistinctTable =
    SUMMARIZECOLUMNS (
        [OFFEN - in Verzug],
        [OFFEN - planmäßig],
        [OFFEN - Start überfällig],
        [IN ARBEIT - in Verzug],
        [IN ARBEIT - planmäßig],
        [ABGESCHLOSSEN]
    )
VAR _Result =
    SUMX (
        _DistinctTable,
        [OFFEN - in Verzug] + [OFFEN - planmäßig] + [OFFEN - Start überfällig] + [IN ARBEIT - in Verzug] + [IN ARBEIT - planmäßig] + [ABGESCHLOSSEN]
    )
RETURN
    _Result

Thanks! working perfectly!

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.