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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
VM_0451
New Member

Using Dax Measure to count all rows in a single column except for one specified value

Hi all,

 

I will keep this short in the first instance as I have had trouble signing in to the board (my last post got eaten).

Essentially, I have a large dataset of weekly staff activity, collated from multiple teams, with teams and names down the rows and weekly submissions along columns.

 

I have unpivoted my dataset in powerquery so that all my values are running down a couple of columns; team and staff member (now multiple per person), date, activity, time spent on that activity.

 

I have used this to create a dashboard of break down this info, however have been trying to also include a data completion stat of some sort to show how much stuff is missing over a given selection. Within the activity column I have a value "No Data Submitted" that I have used a measure to track against the total in a gauge as a temporary solution, however I am sure there must be another way of doing it that tells me how much complete data I have rather than how much incomplete I have. I have been trying to find a dax function that will run a count of all entries except for the "no data submitted" value, however nothing has worked so far. Any suggestions appreciated.

 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@VM_0451 Without sample data and expected output I can only guess but it sounds like:

Measure = COUNTROWS(FILTER('Table',[Activity] <> "No Data Submitted"))

or

Measure = CALCULATE(COUNT('Table'[Name]),[Activity] <> "No Data Submitted")

If this is not it, @ me in a reply and provide sample data and expected output. 



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

@VM_0451 Without sample data and expected output I can only guess but it sounds like:

Measure = COUNTROWS(FILTER('Table',[Activity] <> "No Data Submitted"))

or

Measure = CALCULATE(COUNT('Table'[Name]),[Activity] <> "No Data Submitted")

If this is not it, @ me in a reply and provide sample data and expected output. 



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Yep, that did it.

I got close with my previous attempts but messed up the syntax by not knowing about <>

 

Thanks very much!

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Top Solution Authors