Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

conditional count

Hello everybody,

I have a table that brings information from CRM about workshops the users do.

In reality, these workshops can't be more than two per day. And if there is more, it is a mistake.

I want to show in a table the correct number. So I tried this: 

 

- New column: Concatenate Date Workshop=  if ( 'Activities'[ type of meeting] = "Workshop" ; 'Activities'[scheduledend].[Date] & 'Activities'[type of meeting])

 

- Measure: Corrected number =

Var Count  workshop = CALCULATE(COUNTA('Activities'[Concatenate Date Workshop]))
Return
CALCULATE(if(Count Workshop > 2;1;Count Workshop))

 

But it is not working. 
have a great day!

12 Replies

  • is the filter of the workshop not working. Are you able to use distinctcount ?

    • Anonymous's avatar
      Anonymous
      Not applicable

      I thought about using distinct count, but i need to find equals (same date and qualified as a workshop).