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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Distinct Value

@amitchandak May be you can help here as well.

 

I've created a measure like below:

 

Feature = CALCULATE(DISTINCTCOUNT('devops-query-spr2'[Work Item Type]),FILTER('devops-query-spr2','devops-query-spr2'[Work Item Type]= "Feature"))
 
but its giving be value as just "1" whereas the distinct value for Feature in the report is 89.
 
 
Himanshu_13_0-1615551071161.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Feature = CALCULATE(DISTINCTCOUNT('devops-query-spr2'[Work Item Id]),FILTER('devops-query-spr2','devops-query-spr2'[Work Item Type] = "Feature"))
 
This resolved my issue. The count has supposed to be taken from a different column.
 
Regards,
Himanshu

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , You giving a filter on work item type and taking a distinct of that , They are from different tables, Hope this not key they are joined on

 

Feature = CALCULATE(DISTINCTCOUNT('devops-query-spr2'[Work Item Type]),FILTER('devops-query-spr2','devops-query-spr2'[Work Item Type]= "Feature"))

 

Are you using right column for distinct ?

 

or

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak Please see below table:

 

Work Item TypeWork Iteam iDTitle
Issue1abc
Bug2def
Feature3ghi
Feature4123
User Story5789

 

I want only count of distinct value of Feature from column "Work Item Type" which is 2 but its coming just 1 for me when I'm creating the measure.

 

Feature = CALCULATE(DISTINCTCOUNT('devops-query-spr2'[Work Item Type]),FILTER('devops-query-spr2','devops-query-spr2'[Work Item Type]= "Feature"))
Anonymous
Not applicable

@amitchandak if i use just count the value is coming correct but I want the distinct value which is 89.

 

Himanshu_13_0-1615551273978.png

 

Anonymous
Not applicable

Feature = CALCULATE(DISTINCTCOUNT('devops-query-spr2'[Work Item Id]),FILTER('devops-query-spr2','devops-query-spr2'[Work Item Type] = "Feature"))
 
This resolved my issue. The count has supposed to be taken from a different column.
 
Regards,
Himanshu

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.