Forum Discussion

ShreyasK's avatar
ShreyasK
Frequent Visitor
3 years ago
Solved

How to use AND function in Power BI

I have table in which I want to keep rows which contains "null" and In time is greater than 05:20 from "InTime" column. And exclude rest other rows. Can anyone please help me.

 

Current Table:

User NameInTimeOutTime
Stevenull16:00
Lucy5:3417:10
Jamesnull18:05
Mike1:3014:00
Eric0:30null
Vincent6:0017:30

 

Expected result:

User NameInTimeOutTime
Stevenull16:00
Lucy5:3417:10
Jamesnull18:05
Vincent6:0017:30

 

I have tried with conditional column using OR function and advance filtering for InTime column using AND function but not getting expected results.

  • Hi ShreyasK , you can use this measure:

    In_Time = if(MAX('Table'[InTime])>TIME(5,20,0) || 
    ISBLANK(max('Table'[InTime])),1,0)   

     

    Follow, insert the measure "In_Time", in Filter, and give it the value 1, like the image:

    Best regards

1 Reply

  • Hi ShreyasK , you can use this measure:

    In_Time = if(MAX('Table'[InTime])>TIME(5,20,0) || 
    ISBLANK(max('Table'[InTime])),1,0)   

     

    Follow, insert the measure "In_Time", in Filter, and give it the value 1, like the image:

    Best regards