Forum Discussion
how to use filter with summarize function
Anonymous , You can use
filter(Crossjoin(Table1,table2),table1[a]=table2[a])
but this is very costly
refer these are few options here
https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/
also like
summarize(filter(Table1,Table1[a] = max(Table2[a])),Table1[id],Table1[a],"Measure1",[measure]....)
Hi,
I have used the below DAX:
- v-lionel-msft6 years agoCommunity Support
Hi Anonymous ,
Maybe you should create relationship first.
Then Create a calculated table.
Table = SUMMARIZE( FILTER( 'Task Sla', 'Task Sla'[task] = RELATED(Child[number]) ), 'Task SLA'[task], 'Task SLA'[has_breached], 'Task SLA'[sla], "Business Duration", SUM('Task Sla'[Business]) )Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
Hi v-lionel-msft,
I have 3 tables in my data model : Parent , Child and Task_SLA table. Both Parent and Child table is realted to TASK_SLA table on
'task' column and need to get the sum of business duration in days from task sla table.
So as per your suggestion I have to make realtion of task_sla table with both Parent and Child tables and then need to create a calculated table.
But should it be pobbible to connect 2 table with one table on the same field simulteniouly ? Please advise what should I do now?
- v-lionel-msft6 years agoCommunity Support
Hi Anonymous ,
"But should it be pobbible to connect 2 table with one table on the same field simulteniouly ? "
Yes, you can.
Maybe you can try this formula.
Table = SUMMARIZE( FILTER( 'Task Sla', 'Task Sla'[task] = RELATED(Child[number]) && 'Task Sla'[task] = RELATED(Parent[number]) ), 'Task SLA'[task], 'Task SLA'[has_breached], 'Task SLA'[sla], "Business Duration", SUM('Task Sla'[Business]) )Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.