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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
LisaB
Helper III
Helper III

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
SivaMani
Resident Rockstar
Resident Rockstar

@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

View solution in original post

7 REPLIES 7
SivaMani
Resident Rockstar
Resident Rockstar

Hi @LisaB,

 

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

Hi @SivaMani,

 

I have added some sample data in the original post.

SivaMani
Resident Rockstar
Resident Rockstar

@LisaB,

 

Is that what you are expecting?

 

Output.PNG

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

SivaMani
Resident Rockstar
Resident Rockstar

@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

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

SivaMani
Resident Rockstar
Resident Rockstar

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

That's why you got the error.


Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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