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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
learner03
Post Partisan
Post Partisan

COUNT formula to include BLANK

I have this formula for COUNT-

Count = VAR T1=ADDCOLUMNS(VALUES(ULDs[Location]),"sum",[SUM TOTAL QTY])
RETURN
COUNTROWS(T1)-COUNTROWS(FILTER(T1,[sum]<>0))
I want to edit this formula to include BLANK rows as well in the last part of formula where it is COUNTROWS(T1)-COUNTROWS(FILTER(T1,[sum]<>0)).
 
1 ACCEPTED SOLUTION
Vera_33
Resident Rockstar
Resident Rockstar

Hi @learner03 

 

Try it

Count = 
VAR T1=ADDCOLUMNS(VALUES(ULDs[Location]),"sum",[SUM TOTAL QTY])
RETURN
COUNTROWS(FILTER(T1,[sum]<>0 || ISBLANK([sum]))

View solution in original post

2 REPLIES 2
Vera_33
Resident Rockstar
Resident Rockstar

Hi @learner03 

 

Try it

Count = 
VAR T1=ADDCOLUMNS(VALUES(ULDs[Location]),"sum",[SUM TOTAL QTY])
RETURN
COUNTROWS(FILTER(T1,[sum]<>0 || ISBLANK([sum]))
ryan_mayu
Super User
Super User

@learner03 

could you pls provide the sample data and expected output?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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!

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 Kudoed Authors
Users online (1,778)