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
unclejemima
Post Patron
Post Patron

Overlay income, expense and profit

Looking to create an line graph with income, cost of sales and profit each as a line by month

 

I've got my income and cost of sales as measures and columns per user vega

 

Income = 
IF(
    Table1[Account] >= 4000 && Table1[Account] <= 4999,
    Table1[Amount],
    BLANK()
)
CostOfSale = 
IF(
    Table1[Account] >= 5000 && Table1[Account] <= 5999,
    Table1[Amount],
    BLANK()
)

 -----------------------------------

 

Income Measure = 
CALCULATE(
    SUM(Table1[Amount]),
    Table1[Account] >= 4000 && Table1[Account] <= 4999,
    VALUES(Table1[Account])
)
CostOfSale Measure = 
CALCULATE(
    SUM(Table1[Amount]),
    Table1[Account] >= 5000 && Table1[Account] <= 5999,
    VALUES(Table1[Account])
) 

 That being said, I would have to create another measure for income - costofsale = profit.  It would also be nice to have profit displayed as gross margin so probably separate calc for that gross sales / gross profit = gross margin I think.

 

But even getting the income to overlay the cost of goods on a line graph I can't seem to figure.


help 🙂

1 ACCEPTED SOLUTION
unclejemima
Post Patron
Post Patron

Ha, figured it!  I must have been overlooking something simple.

 

Made a new line graph showing values from colums of  income and costofsales, as well I made a new column for income - costofsales for profit.  Then used the Axis as month.


Voila!

 

thanks ;-0

View solution in original post

1 REPLY 1
unclejemima
Post Patron
Post Patron

Ha, figured it!  I must have been overlooking something simple.

 

Made a new line graph showing values from colums of  income and costofsales, as well I made a new column for income - costofsales for profit.  Then used the Axis as month.


Voila!

 

thanks ;-0

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.