Forum Discussion

learner03's avatar
learner03
Icon for Post Partisan rankPost Partisan
4 years ago
Solved

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 creat...
  • AllisonKennedy's avatar
    4 years ago

    learner03 

     

    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-msft's avatar
    4 years ago

    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.