cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

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

Accepted Solutions
Highlighted
Super User II
Super User II

Re: Count Only Once for Duplicate Values Caused due to Date

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
Highlighted
Super User II
Super User II

Re: Count Only Once for Duplicate Values Caused due to Date

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

Highlighted
Helper II
Helper II

Re: Count Only Once for Duplicate Values Caused due to Date

Thanks, it did work.

 

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Featured Data Story of The Month

Featured Data Story of The Month

All Data Stories Gallery contributions are reviewed for each month. We select a contribution and feature the community member the following month.

Power BI Dev Camp - Developing with .NET Core

Power BI Dev Camp - Developing with .NET Core

Learn how to develop custom web applications for Power BI using .NET Core 3.1 and .NET 5.

Power BI Desktop August 2020 Update

Power BI Desktop August 2020 Update

We have great updates this month! Click the link for the video with more info.

Top Solution Authors
Top Kudoed Authors