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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
poweruser55
Helper IV
Helper IV

Count not blanks

I have three statements that need to be added together. The first is OLI = Booked or Lost and Winning Vendor is Blank. The second is OLI = Active and winning vendor is not blank. The third is OLI = Lost and winning vendor = "S". I believe the forumla is correcr exceot for when it comes to the second statement counting not blanks. Capture.PNG

1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @poweruser55 

 

Has your problem been solved? I see that you have not responded since then.

vjaneygmsft_0-1645518365386.png

 

I checked your needs, you don't need to use countx or countblank functions in your code. You just need to use xxx=blank() or xxx<blank() in filter().

Like this:

vjaneygmsft_1-1645518579277.png

Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.

 

Best Regards,

Community Support Team _Janey

View solution in original post

4 REPLIES 4
v-janeyg-msft
Community Support
Community Support

Hi, @poweruser55 

 

Has your problem been solved? I see that you have not responded since then.

vjaneygmsft_0-1645518365386.png

 

I checked your needs, you don't need to use countx or countblank functions in your code. You just need to use xxx=blank() or xxx<blank() in filter().

Like this:

vjaneygmsft_1-1645518579277.png

Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.

 

Best Regards,

Community Support Team _Janey

Pragati11
Super User
Super User

Hi @poweruser55 

What DAX error you have at the bottom of your dax expression? it is currently hidden in the screenshot. 

Also what is the reason of using COUNAX() function?

You are using COUNTAX with && condition without writing any condition there.

 

You need a compariosn there.

COUNTAX function requires 2 arguments. Something like this:

COUNTAX(<table>,<expression>)

 

See details here: https://docs.microsoft.com/en-us/dax/countax-function-dax

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

@Pragati11 I am trying to count everything that is not a blank. The error is that I dont have 2 arguments. I don't know what the other argument is supposed to be because I just need it to count everything in the column that is not blank.

Hi @poweruser55 ,

 

You can club your condition in COUNTAX something like below from Line 6 & 7:

 

 


COUNTAX ( FILTER ( '999_Funnel', [OLI.Status] = "Active" ), [C Winning Vendor] )

 

I haven't checked the DAX. So try it.

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors