Forum Discussion

Sams1's avatar
Sams1
New Member
2 years ago
Solved

Filter with date condition clarification

Hi all,

please help me with this following questions:

I am new to powe bi and trying this...

I have column with status and updated date and i need to achieve this in DAX, kindly provide your input.

Ex:

status = Closed AND (status changed to Closed after '2023/04/01' AND status changed to Closed before '2023/04/30')

 

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Sams1 ,

    Please have a try.

    Create a measure.

    Closed in April 2023 =
    CALCULATE (
        COUNTROWS ( Table1 ),
        FILTER (
            Table1,
            Table1[Status] = "Closed"
                && Table1[UpdatedDate] >= DATE ( 2023, 4, 1 )
                && Table1[UpdatedDate] <= DATE ( 2023, 4, 30 )
        )
    )
    

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

     

     

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Sams1 ,

    Please have a try.

    Create a measure.

    Closed in April 2023 =
    CALCULATE (
        COUNTROWS ( Table1 ),
        FILTER (
            Table1,
            Table1[Status] = "Closed"
                && Table1[UpdatedDate] >= DATE ( 2023, 4, 1 )
                && Table1[UpdatedDate] <= DATE ( 2023, 4, 30 )
        )
    )
    

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.