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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.