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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Measure with If statement checking for value

Hey everyone,

 

In my dataset I have a column called "Isclosed" which has a value of True or False.

 

In my vizualisation I am trying to create a "card" or anything that display "Closed" if the value is True (True=Closed) and "Active" if the value False (False=Active).

 

What kind of measure can I do to help me out with this?

 

Thank you

1 ACCEPTED SOLUTION

Hi @Anonymous ,
Here is a picture with either a table or a card.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel

 

Closed.PNG

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

8 REPLIES 8
Anonymous
Not applicable

UPDATE

 

I have tried to combine a aggregate function like below 

 

 

 

status = If(ALL('TimeExport (3)'[BudgetClosed]) = "True","Closed","Active")
 
but I got this error 
 
error2.PNG
This is most likely because the values in the table are booleans.
any solution would be greatly appreciated!

Hi @Anonymous ,
Try using MAX instead of ALL.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

hey @Nathaniel_C  i appreciate the help,

 

I am still getting this error when using MAX STILL.PNG

Hi @Anonymous ,


I will send you a pbix that has this implemented.

 

Status = IF(MAX( mytable[BudgetClosed]) = "True","Closed","Active")

 


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @Anonymous ,
Here is a picture with either a table or a card.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel

 

Closed.PNG

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Hey @Nathaniel_C thanks for the help! I had to first convert the whole column to a text type (as it was boolean) so it did not work before but now it works perfectly.

Nathaniel_C
Community Champion
Community Champion

 

If(table[IsClosed] = "True","Closed","Active")

Hi @Anonymous ,
Try this.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Hey there Nathaniel,

 

It keeps giving me a error as I cant select the table[IsClosed]. This is probably because I need a aggregate function? This is what I get

yes.PNG

 

Let me know what you suggest.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.