Forum Discussion
Filter from two columns from different Table
I have a Calender Table which I use to calculate Previous Day.
I need to calculate Number of Document Numbers that were closed with 48 hours in previous day.
For Close within 48 hours, I have created a calculated column with-
| Order Table | ||
| Document No | Completed in 48 Hrs | Completed Time |
| AB123 | Yes | 25/10/2021 1:02:00Pm |
| AC234 | No | 25/10/2021 2:05:15PM |
| Ad345 | Yes | 26/10/2021 1:32:33Pm |
| AE567 | No | 26/10/2021 2:03:23Pm |
For calculating closed on previous day, I have
What does your data model look like? If the Calendar table is related to the Order Table on Completed Date (you'll need to extract Date Only so it doesn't have the Time), then you can use a simple measure, for example:
Measure = CALCULATE( COUNT(Order[Document No]) , Calendar[PreviousDay] = "Yes", Order[Completed in 48 Hrs] = "Yes")
Hi, learner03 ;
Try it.
Count = COUNTX ( FILTER ( ALL ( 'Order' ), [Completed in 48 hours] = "Yes" && [Completed Time] = [VAR Prev_Day] ), [Document No] )If not applicable, can you share more information about your table structure? Or simple files and scenes after removing sensitive information?
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- AllisonKennedyCommunity Champion
What does your data model look like? If the Calendar table is related to the Order Table on Completed Date (you'll need to extract Date Only so it doesn't have the Time), then you can use a simple measure, for example:
Measure = CALCULATE( COUNT(Order[Document No]) , Calendar[PreviousDay] = "Yes", Order[Completed in 48 Hrs] = "Yes")
- v-yalanwu-msftCommunity Support
Hi, learner03 ;
Try it.
Count = COUNTX ( FILTER ( ALL ( 'Order' ), [Completed in 48 hours] = "Yes" && [Completed Time] = [VAR Prev_Day] ), [Document No] )If not applicable, can you share more information about your table structure? Or simple files and scenes after removing sensitive information?
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - v-yalanwu-msftCommunity Support
Hi, learner03 ;
Is your problem solved?? If so, Would you mind accept the helpful replies as solutions? Then we could close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.
Best Regards,Community Support Team_ Yalan WuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.