Forum Discussion

mwalden's avatar
mwalden
Frequent Visitor
2 years ago

Dividing a number on a Visualization Table when the data is imported.

Hello!!

 

I have this table below and I was able to divide Total Emails by Headcount to get Emails Per Person in Transform Data (see table 1A below.). However, Total Calls Answered was importanted by linking to a different Dataset - I am not able to manipulate this data at all. When I got to table it says the following: 

 

Does anyone know if there is a way to get around this and divide totall Calls Answered by Headcount on the table?

 

When I try to divide nanswered by headcount - headcount does not show up.

Table 1A.

4 Replies

  • AllisonKennedy's avatar
    AllisonKennedy
    Community Champion

    mwalden  I don't think the import / not import is the issue here, but rather aggregate function or not. 

     

    You can't divide by a column within a measure without using an aggregate function. 

     

    Try the following measures:

     

    Total Emails = SUM ( Fact[Emails] )

    Total Headcount = SUM (fact[employee ) 

    OR 

    Total Headcount = DISTINCTCOUNT (fact[employeeid] ) 

     

    Total Emails per person = DIVIDE ( [Total Emails] , [Total Headcount] )

     

    If that doesn't work, can you provide a screenshot of your model / relationships view please?

    • mwalden's avatar
      mwalden
      Frequent Visitor

      AllisonKennedy 
      OK so I am getting closer thanks to your help!!

      Here is the issue now, I cannot get Total Headcount to match the correct headcount. I also can't get the fact to work for it. 

       

      Here is what I have right now and it gives me too many headcount. SEe the table below that shows what the headcount should be. 

      This is what happens when I add fact to it:

       

      The problem is that I have a a table that shows the headcount - can I create a measure that just outputs the numbers that are in the table???

      • mwalden's avatar
        mwalden
        Frequent Visitor

        Count gets me closer to the better number