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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
broccolihead
Regular Visitor

COUNTX returning BLANK in total

I'm trying to calculate a distinct count of a column based on the results from a measure. The measure returns correct output on the row level when selecting a specific row in the table view, but it shows BLANK when clicking out of the row as the total. I have tried everything but nothing is working. The exact formula works with another dataset where project hash key doesn't not contain duplicate values. Can someone please help?

 

 

 

Count = COUNTX(FILTER(VALUES('Assignment Data Points'[Project Hash Key]),[in Queue Assigned]="In Queue Assigned"),'Assignment Data Points'[Project Hash Key])

 

 

 

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

Hi @broccolihead ,

Below is my table:

vxiandatmsft_0-1705910395751.png

The following DAX might work for you:

Count = 
   CALCULATE(
    COUNT('Assignment Data Points'[Project Hash Key]),
    FILTER('Assignment Data Points','Assignment Data Points'[in Queue Assigned] = "In Queue Assigned")
  )

The final output is shown in the following figure:

vxiandatmsft_1-1705910433300.png

Best Regards,

Xianda Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xiandat-msft
Community Support
Community Support

Hi @broccolihead ,

Below is my table:

vxiandatmsft_0-1705910395751.png

The following DAX might work for you:

Count = 
   CALCULATE(
    COUNT('Assignment Data Points'[Project Hash Key]),
    FILTER('Assignment Data Points','Assignment Data Points'[in Queue Assigned] = "In Queue Assigned")
  )

The final output is shown in the following figure:

vxiandatmsft_1-1705910433300.png

Best Regards,

Xianda Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

PijushRoy
Super User
Super User

Hi @broccolihead 

Please share sample PBIX file link 

Please show the expected outcome based on the sample data you provided. Find how to provide sample data
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...


How to get answered quickly
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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