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

Get Fabric certified for FREE! Don't miss your chance! Learn more

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
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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