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
jnnilesh29
Helper III
Helper III

Count Only Once for Duplicate Values Caused due to Date

Hello everyone, 

 

My table has unique activity ID and each activity ID has an activity status (Not Started/In Progress/Completed) associated with it. 

I would like to calculate a total number of activities with Not Started or In Progress or Completed status. 

However these activities IDs are duplicated becasue of unpivot column action to date column and therefore I'm getting wrong results.

 

 

jnnilesh29_1-1593716838066.png

I tried formula below but still not getting right results 

 

Not Started Count = CALCULATE(DISTINCTCOUNT('Activity Code with Budgeted Units'[Activity ID]),'Activity Code with Budgeted Units'[Activity Status]="Not Started")

 

Can somebody help me with this? Your help is appreciated.

 

Regards,

Nilesh Jain

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hi @jnnilesh29 

try ALL

Not Started Count = CALCULATE(DISTINCTCOUNT('Activity Code with Budgeted Units'[Activity ID]),'Activity Code with Budgeted Units'[Activity Status]="Not Started", ALL('Activity Code with Budgeted Units'))

or show please what exactly wrong with your result


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

2 REPLIES 2
az38
Community Champion
Community Champion

Hi @jnnilesh29 

try ALL

Not Started Count = CALCULATE(DISTINCTCOUNT('Activity Code with Budgeted Units'[Activity ID]),'Activity Code with Budgeted Units'[Activity Status]="Not Started", ALL('Activity Code with Budgeted Units'))

or show please what exactly wrong with your result


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Thanks, it did work.

 

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.