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 VI
Super User VI

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 VI
Super User VI

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
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Don't miss the Power BI Dev Camp this week!

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Kudoed Authors