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
appsac1
Helper I
Helper I

Count

Hello,

I have created a simple table 

 

appsac1_0-1677159538914.png

 

where measure

Count_Lost2 = if([Last_Sales]==BLANK(),1)

 

I want to count this coulmn. Is it not possible to count measures?

 

Thanks for any help.



 

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

You need to create a variable to hold the values at the granularity you want, then you can run SUMX over that. If you wanted it at year level you could use something like

Count of measure =
VAR SummaryTable =
    ADDCOLUMNS ( VALUES ( 'Date'[Year] ), "@value", [Measure to count] )
RETURN
    SUMX ( SummaryTable, [@value] )

View solution in original post

3 REPLIES 3
tb0493
Frequent Visitor

Need some help, Can someone describe how excel counts and calculation can be performed in Power BI? I have a dataset and I think DAX COUNTA or COUNTAX maybe part of the solution. Please provide the format in DAX, it would be much appreciated!

 

tb0493_0-1679091289834.png

 

appsac1
Helper I
Helper I

Ohhh, nice! Thanks so much. It works 🤗

johnt75
Super User
Super User

You need to create a variable to hold the values at the granularity you want, then you can run SUMX over that. If you wanted it at year level you could use something like

Count of measure =
VAR SummaryTable =
    ADDCOLUMNS ( VALUES ( 'Date'[Year] ), "@value", [Measure to count] )
RETURN
    SUMX ( SummaryTable, [@value] )

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.