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

Chart Question

Hi,

 

Need your help please. I have the following Data:

 

Date&TimePeriodAccountCategoryPayee/PlaceAmountClearedNoteSign
7/31/2019 22:212019 P07Main Account basketball($7.00)Yes -1
7/30/2019 18:172019 P07Main Account sahha($5.00)Yes -1
7/30/2019 8:072019 P07Main Account Audi LBP$145.00Yes 1
8/29/2019 19:552019 P08Main Account crepeaway($25.00)

Yes

 -1

and so on, 

 

I calculate the expense and income with the following measure formula

Expenses =
CALCULATE(SUM('Pocket Expense'[Amount]), 'Pocket Expense'[Sign] IN { -1 })
 
Income =
CALCULATE(SUM('Pocket Expense'[Amount]), 'Pocket Expense'[Sign] IN { 1 })
 
How can I create a graph that shows on the Y-axis the difference (Income - Expense) for every period (X-axis).
 
June is P06
July is P07
August is P08
 
Thanks,
..
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

@abukapsoun 

I created a new measure called income - expense (Where income and expense are measures i created with the same forumula given by you) and added that as values under a Bar chart with Period as X axis ( Note: I have done Income +expense in the formula to take care of the negative sign in amount, so the subtraction would happen properly)

 

Income_Expense.png

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@abukapsoun 

I created a new measure called income - expense (Where income and expense are measures i created with the same forumula given by you) and added that as values under a Bar chart with Period as X axis ( Note: I have done Income +expense in the formula to take care of the negative sign in amount, so the subtraction would happen properly)

 

Income_Expense.png

Anonymous
Not applicable

@abukapsoun 

Have you tried to create a new calculated column that just calculates the difference between Income and Expense? You could probably just drag that new column into the "Values" section of your plot.

If the only periods you're looking at are June, July, and August of 2019, you can just stick the "Period" column into the "Axis" section of your plot. If you're having issues with ordering that, you would have to create an index column that orders the months accordingly. For instance, having another column that sets June=1, July=2, August=3 and sorting the plot by that new column in ascending order.

Yes i faced difficulties to create calculated column from measures
Anonymous
Not applicable

@abukapsoun 

Oh, I see. Well since your "Amount" column does technically include Income and Expenses (income being positive values and expenses being negative values), you could try to create a Measure that just sums your "Amount" column.

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.