cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LisaB
Helper II
Helper II

Sum of values in same chart

Hi,

 

I am pretty new to Power BI and learing more and more every day.

 

I am creating a report that will show me sales values depending on sales person, customer type etc. To do this I am using amounts from the ERP system where sales invoice lies in one table and sales credit amound lies in another table. This means I have to queries.

 

What I want to do: Sales person total amount = sales invoice amount - sales credit amout. I want to visualise each sales person's amount in the same chart.

 

Example data

https://1drv.ms/x/s!AnO0yKcIgtwGgcsBzanKGyX-D4riIA

 

 

Any suggestions?

 

Thank you!

Lisa

1 ACCEPTED SOLUTION

@LisaB,

 

1.Create a table to have Sales person's code,

 

SPC = DISTINCT(SalesInvoice[Salesperson_Code]) 

 

2. Create a relationship like below,

 

Relationship.PNG

 

3.Create a measure for Total Amount,

 

TA = SUM(SalesInvoice[Invoice]) - SUM(SalesCredit[Credit]) 

 

That's it


Best Regards,
Siva Mani

View solution in original post

7 REPLIES 7
SivaMani
Super User
Super User

Hi @LisaB,

 

It would be easy to help if you share some sample data


Best Regards,
Siva Mani

Hi @SivaMani,

 

I have added some sample data in the original post.

@LisaB,

 

Is that what you are expecting?

 

Output.PNG


Best Regards,
Siva Mani

Kind of. I want it a bit more summarised, just one line for each sales person.

@LisaB,

 

1.Create a table to have Sales person's code,

 

SPC = DISTINCT(SalesInvoice[Salesperson_Code]) 

 

2. Create a relationship like below,

 

Relationship.PNG

 

3.Create a measure for Total Amount,

 

TA = SUM(SalesInvoice[Invoice]) - SUM(SalesCredit[Credit]) 

 

That's it


Best Regards,
Siva Mani

View solution in original post

Hi @SivaMani,

 

Thank you, that worked fine for me!

 

I want to make an additional sum, just like the one for SalesPerson. I followed your steps but I cannot activate one of the relationship.

 

Bild 3.pngBild 4.png

@LisaB
The created relationship depend on each other. It like a loop.

That's why you got the error.



Best Regards,
Siva Mani

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!