Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
aso1
Helper II
Helper II

Create simple card - ok/error

I have a daily job where I press the 'date-in' filter on a daily basis (lower left in the report), and I check to see if 'Status' is OK down the list or not. 

 

(here is my actual report)

integrity_report.jpg

 

 

I want to make this smarter... by having a card that basically says "OK" or "ERROR". 

 

integrity_card.jpg

The card must check the latest date (date_in), then it must check to see if all items in 'Status' is OK. 

if all items are OK - then type "OK" If it is not ok - then the card must type "ERROR".  

 

 

How can I achieve this?

thanks in advance

1 ACCEPTED SOLUTION

hi  @aso1 

I'm sorry for my carelessness, please use "," instead of "&&" in the formula

Result =
IF (
CALCULATE ( COUNTA ( 'Table'[Status] ), 'Table'[Status] <> "OK",'Table'[database]<> "Tempdb") > 0,
"ERROR",
"OK"
)
 
Regards,
Lin
Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-lili6-msft
Community Support
Community Support

hi @aso1 

Create a measure like this 

Result =
IF (
    CALCULATE ( COUNTA ( 'Table'[Status] ), 'Table'[Status] <> "OK" ) > 0,
    "ERROR",
    "OK"
)

 

Then drag this measure into card visual.

 

Regards,

lin

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

wow!.. perfect!!.. this works. 

however, I just need to filter out 'Tempdb' out. I dont need a check on that database. 

if tempdb is out of this list, then I will have 100% OK. 

 

I tried filtering it out in the report .. but that still gave me "ERROR / NOT OK" in the card. 

Can you put a exclude in the result, so it wont check for the tempdb database?.. 

 

tempdb.jpg

hi  @aso1 

Adjust the formula as below:

Result =
IF (
    CALCULATE ( COUNTA ( 'Table'[Status] ), 'Table'[Status] <> "OK"&&'Table'[database]<> "Tempdb") > 0,
    "ERROR",
    "OK"
)

 

Regards,

Lin

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

getting this error.

error_.jpg

hi  @aso1 

I'm sorry for my carelessness, please use "," instead of "&&" in the formula

Result =
IF (
CALCULATE ( COUNTA ( 'Table'[Status] ), 'Table'[Status] <> "OK",'Table'[database]<> "Tempdb") > 0,
"ERROR",
"OK"
)
 
Regards,
Lin
Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

@aso1 , you can get last status like

lastnonblankvalue(calllog[Date],max(calllog[status]))

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.