Forum Discussion

bourne2000's avatar
bourne2000
Icon for Helper V rankHelper V
4 years ago
Solved

Measure is not working in Table visual

Hi

 

I am having below data model

 

 

Target table and sales table connected through Sales ID. Same with sales Target and salesperson

 

Target Table as below

 

 

Salesperson Table as below

 

 

SalesTable as below

 

 

I am trying to create a table visual as below

 

 

 

 

Sales Target for each salesperson is per day and it is static. So the target table has Sales ID and Target for each person. It means each salesperson has the same target for each day

 

What do I want?

 

I wanted to calculate % the Target for each day

% Target formula = Total Sales/ Sales Target

 

Example for date: 2/11/2020, total sales is 21 and sales target is 16. % Target = 21/16 which is equal to 1.31. However, I am getting different values. 

 

I used this measure to calculate the %Target

 

%Target = SUM('Sales Table'[Total Sales])/SUM(Target[Sales Target])

 

It's not calculating each date. Can anyone advise how to do this?

 

Here is the sample pbix file https://we.tl/t-Xxww86tdCg

 

 

 

 

 

  • Hi bourne2000 

     

    Try SUM / MAX for the %Target

    %Target = SUM('Sales Table'[Total Sales]) / MAX(Target[Sales Target])

     

    Regards

     

    Phil

1 Reply

  • Hi bourne2000 

     

    Try SUM / MAX for the %Target

    %Target = SUM('Sales Table'[Total Sales]) / MAX(Target[Sales Target])

     

    Regards

     

    Phil