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
Anonymous
Not applicable

SUMMARIZE USING DISTINCTCOUNT

Hello, all! 

 

I need help with the following issue:

 

I have this table:

YearMonthIDText

2021

Jan123A
2021Feb123A
2021Mar123A
2021Mar123B
2021Mar123C

 

I need to do a distinct count to see how many Texts i have for Year/Month/ID. 

 

So I need the following output

 

YearMonthIDText
2021Jan1231
2021Feb1231
2021Mar1233

 

I've tried something like this

 

 

test = (DISTINCTCOUNT(
    SUMMARIZE ( Consult, Consult[date].[year], Consult[date].[month], Consult[id]),
    [Text])

 

 

But it didn't work 😞

I believe SUMMARIZE can solve the poblem but if there is any other option, please, Im all ears.

 

So, if anyone coulp help me, Ill be plesead 🙂

1 ACCEPTED SOLUTION

@Anonymous Oh, sorry, should just be this:

test = COUNTROWS(
    SUMMARIZE ( Consult, Consult[date].[year], Consult[date].[month], Consult[id]) )


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

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@Anonymous Try:

test = (COUNTROWS(
    SUMMARIZE ( Consult, Consult[date].[year], Consult[date].[month], Consult[id]),
    [Text])

SUMMARIZE will already return each row as a distinct combination of what you are summarizing over.



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...
Anonymous
Not applicable

Its not recognizing the column 'Text' as a column 😕

@Anonymous Oh, sorry, should just be this:

test = COUNTROWS(
    SUMMARIZE ( Consult, Consult[date].[year], Consult[date].[month], Consult[id]) )


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
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.