Forum Discussion
tomerfaith
8 years agoFrequent Visitor
Interaction Between FILTER() and ALL()
First let me describe the situation: I have a table with "Order Date" , "Supply Date" and "Sum" columns, and a date table. I created a relationship between "Supply Date" and the date table. and i n...
v-xjiin-msft
8 years agoSolution Sage
Hi tomerfaith,
Check this:
Order Sum Open At The Time 2 = VAR minDate = MIN('Calender'[Date]) RETURN
VAR maxDate = MAX('Calender'[Date]) RETURN
CALCULATE(SUM('ORD'[Sum]),//ALL('ORD'[Supply Date]),
FILTER(ALL('ORD'[Supply Date],ORD[Order Date]),
'ORD'[Order Date]<=maxDate && 'ORD'[Supply Date]>=minDate
)
)
Thanks,
Xi Jin.
tomerfaith
8 years agoFrequent Visitor
Sadly I still get similar result:
- v-xjiin-msft8 years agoSolution Sage
Hi tomerfaith,
Could you please share us the pbix file with OneDrive or something else? So that I can dig deeper.
Thanks,
Xi Jin.- tomerfaith8 years agoFrequent Visitor
I have created a test pbix:
https://drive.google.com/file/d/1LaPNFfoSuxURiIQfJ-4L5aUEiw-OkRMs/view?usp=sharing- v-xjiin-msft8 years agoSolution Sage
Hi tomerfaith,
I found out the issue. In my sample, the relationship between Calendar and ORD is one to one. However in yours, it is many to one.
To resolve your issue, you just need to change the relationship to one to one.
And if you want to know why. Honestly I have no idea. It seems like there exists some limitations which we don't know in many to one relationship.
Thanks,
Xi Jin.