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

Count number of values

Hi guys, 

 

i want to count the number of values i have in a table: 

 

Unbenannt.JPG

 

What i want is this: 

Unbenannt.JPG

 

ATM i have this measure but it does not work: 

Unbenannt.JPG

Anybody any ideas? 

 

Appreciate!!

 

Thx

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Perhaps:

Measure =
  VAR __SKU = MAX('Table'[SKU])
RETURN
  COUNTROWS(FILTER(ALL('Table'),[SKU] = __SKU))

@Anonymous  



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
amitchandak
Super User
Super User

@Anonymous , You need to all except in the measure 

 

count = calculate(Table[Column1], allexcept(Table,allexcept(Table,Table[SKU]))

 

https://www.sqlbi.com/articles/using-allexcept-versus-all-and-values/

 

In case you need a new column

countx(filter(Table,table[SKU]=earlier(Table[SKU])),Table[Column1])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

 

Measure = CALCULATE (COUNT ('Table' [SKU])))

 

and make sure valus are not Summarized.

 

1.jpg

 

Regards,

Harsh Nathani

 

Greg_Deckler
Community Champion
Community Champion

Perhaps:

Measure =
  VAR __SKU = MAX('Table'[SKU])
RETURN
  COUNTROWS(FILTER(ALL('Table'),[SKU] = __SKU))

@Anonymous  



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