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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
DawdF95Rze
Frequent Visitor

Sum of unique values for each row within the same category

Hi all,

 

I have a problem with calculating the sum of unique values. I mean calculating the sum of the unique number of days in the question. Ultimately, the value 3+7= 10 should be output for each GUID within the same question

 

I use this DAX function:

Sum unique number of days for each row = CALCULATE(sumx(DISTINCT(Tabela[GUID]);FIRSTNONBLANK(Tabela[Number of Days];0));ALLEXCEPT(Tabela;Tabela[Term]))
 
but its not working, because its return Goal value only in the summary of the table not in the each row

GUIDNumer of daysTermRespondQuestionGoal  value
3243423power biKowalskiSunrname?10
3243423power biNowakSunrname?10
2352367c#boniekSunrname?10
2352367c#KowalSunrname?10
2352367c#ZelnikSunrname?10


I need this solution in pivot table and DAX
1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Maybe:

 

Measure =

  CACLULATE(

    SUMX(

      DISTINCT('Table'[Numer of days])),

      [Numer of days]

    ),

    ALLEXCEPT('Table','Table'[Question])

  )



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

Maybe:

 

Measure =

  CACLULATE(

    SUMX(

      DISTINCT('Table'[Numer of days])),

      [Numer of days]

    ),

    ALLEXCEPT('Table','Table'[Question])

  )



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors