Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bourne2000
Helper V
Helper V

Measure is not working in Table visual

Hi

 

I am having below data model

 

bourne2000_0-1645651523588.png

 

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

 

Target Table as below

 

bourne2000_1-1645651590277.png

 

Salesperson Table as below

 

bourne2000_2-1645651609621.png

 

SalesTable as below

 

bourne2000_3-1645651657394.png

 

I am trying to create a table visual as below

 

bourne2000_5-1645651782926.png

 

 

 

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

 

 

 

 

 

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @bourne2000 

 

Try SUM / MAX for the %Target

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

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

1 REPLY 1
PhilipTreacy
Super User
Super User

Hi @bourne2000 

 

Try SUM / MAX for the %Target

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

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.