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
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.

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
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.