Forum Discussion
iamprajot
8 years agoResponsive Resident
Problem with Relationship and Getting Aggregates
Hi Link to the file is Here. I have 3 Tables Orders - Order Related Details with Unique Column, OrderID, OrderDate, ... and so on. Returns - Contains a single column, ReturnID which contains Orde...
- 8 years agoThanks.
It is working in the attached sample data but not working in the actual data.
I somehow need to use the logic provided in the actual scenario or I was thinking of creating a summary table to get the values based on matching conditions.
Anonymous
8 years agoNot applicable
HI iamprajot,
I think you need to write a formula to manually get available order date range in summary row contents, then find out matched Expenses records.
Sample formula:
Total Expense =
VAR _valid =
MINX ( VALUES ( Orders[OrderDate] ), [OrderDate] )
RETURN
IF (
_valid <> BLANK (),
CALCULATE (
SUM ( Expenses[Expense] ),
FILTER (
ALL ( Expenses ),
[ExpenseDate]
IN CALENDAR (
DATE ( YEAR ( _valid ), MONTH ( _valid ), 1 ),
DATE ( YEAR ( _valid ), MONTH ( _valid ) + 1, 1 )
- 1
)
)
)
+ 0
)
Regards,
Xiaoxin Sheng
- iamprajot8 years agoResponsive ResidentThanks.
It is working in the attached sample data but not working in the actual data.
I somehow need to use the logic provided in the actual scenario or I was thinking of creating a summary table to get the values based on matching conditions.