Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Divide Activities with margin

Hi all,

 

I need to devide the current activities from one team with the current margin from the accounts.

For example:

Team "Romandie" have  3.3K activities and accounts with current margin (DB) 853'200.

So 853'200 % 3'300 = x

 
 

I've already tried with:

Count activities = DIVIDE(CALCULATE(SUM(Activities[subject])
;Users[teammembership_association.name]="Romandie")
;SUM(accounts[new_currentyearrdb]))
 
But it shows me the error:
Thanks forward
  • Anonymous , if want to use sum, you need have number, You can use count, distinctcount , min /max on the text. Now if it is number and marked as text, change the data type. or create a new number column using it

     

    SNO  = [Serial No]*1

     

    If that has only number this will work

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    The error message is telling you that you are trying to perform a mathematical function on a string (or text) value. You probably want to double check the "subject" and "new_currentyearddb" are values and then it should work

  • Anonymous , Activities[count activities], is some how is text and a sum operation has been used, can you check that measure andd column and changes its data type. make sure you have not added + "" in measure or some formatting

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks amitchandak for your reply.

      Which brings me to my next problem. Subject is not a number, it is only displayed as a number in the table "Count of Subject by team (...)".

      I suppose I cannot use the displayed number?

      • amitchandak's avatar
        amitchandak
        Super User

        Anonymous , if want to use sum, you need have number, You can use count, distinctcount , min /max on the text. Now if it is number and marked as text, change the data type. or create a new number column using it

         

        SNO  = [Serial No]*1

         

        If that has only number this will work