cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nepal101
Advocate I
Advocate I

Create calculated Table with conditions

Hello Everyone, 
I am trying to create a calculated table with a given logic shown in the pic below compliant.JPG

 

I basically need two lines of true and false in a new table saying if there is any missing or expired then it should be false or else true for the given date and driver. 

I would appreciate it if you can help me with this 
Thank you in advance. 

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @Nepal101 ,

 

from my understanding this measure will return what you are looking for:

Measure = 
var check =
    COUNTROWS(
        FILTER(
            VALUES( 'Table'[audit type] )
            , 'Table'[audit type] in { "expired" , "missing" }
        )
    )
return
IF( ISBLANK( check ) , TRUE() , FALSE() )

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

2 REPLIES 2
TomMartens
Super User
Super User

Hey @Nepal101 ,

 

from my understanding this measure will return what you are looking for:

Measure = 
var check =
    COUNTROWS(
        FILTER(
            VALUES( 'Table'[audit type] )
            , 'Table'[audit type] in { "expired" , "missing" }
        )
    )
return
IF( ISBLANK( check ) , TRUE() , FALSE() )

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Hello @TomMartens 
Thank you for the reply.
I used that measure but something is not correct. Even if the Audit type key 2 = compliant instead of that giving me true other numbers are also giving me true. Am I missing something here?
true and false.JPG

Var check=
countrows(
Filter(
VALUES('TabIe'[AuditTypeKey])
,'Table'[AuditTypeKey] in
{1,3,4}
)
)
Return
If(ISBLANK(check),True(),False())

I used the same measure. 
Audit type.JPG
In the above scenario, for the employee Key 2, we see 2,3,4 as an audit type even if it has 2 this will be false because there is 3 and 4 in there for that employee key. if the audit type was 2  in all the lines then only we could say it is true or else we have to say false. 
I would really appreciate if you can help me with this 
Thank you once again. 

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!