Forum Discussion
In and out-flow from money. Create difference and aggregate value by month.
Hi sven7,
I would add a calendar table to you model but using your columns just add the following measure:
Balance = SUM(Money_In_Out[Amount received])-SUM(Money_In_Out[Amount taken])
then add it to your table.
Regards,
MFelix
Thanks in advance and Br
Sven
- MFelix8 years ago
Super User
Hi sven7,
Add a calendar table and don't make any relationship between both tables.
Then add this measure:
Balance = var DimDate = MAX('Calendar'[Date]) return TOTALYTD(SUM(Money_In_Out[Amount received])-SUM(Money_In_Out[Amount taken]),Money_In_Out[Date]<= DimDate)Regards,
MFelix
- sven78 years agoFrequent Visitor
MFelix Thanks again for your help.
I have tried this approach, but it only gives me the same value for all dates. I have created a seperated table with the calendarauto function, made sure there is no connection to other tables and put in your formula and adjusted it according to my names.
Do you have an idea why there is the same value everywhere?
Thanks in advance and BR
Sven
- v-jiascu-msft8 years ago
Microsoft Employee
Hi sven7,
How did you create the visuals? It seems this simple measure is enough. You can see it from the snapshot.
Measure = SUM ( Table1[Amount received] ) - SUM ( Table1[Amount taken] )
Best Regards!
Dale