cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
akerrout
Helper III
Helper III

Dax formula + back ground color

Hello everyone,

I would like to create a background color when :
if one of the two periods is blank and not the other, it should return in red where values are missing.
I have tried the following formula :

COP1 CHECK = IF(OR(AND([COP1]=BLANK(),NOT(ISBLANK([COP1 LMTD]))),AND([COP1 LMTD]=BLANK(), NOT(ISBLANK([COP1])))),"MISSING","OK")

then I used the formula as the background color criteria but it is not working .





 

akerrout_0-1689778878424.png

i would like to have something similar or a third column that says that value are missing.Only if one of them are blanc , if both are blank it should not return anything.

1 ACCEPTED SOLUTION
rubayatyasmin
Super User
Super User

Hi, @akerrout 

 

 

try using || instead of AND

for example:

Missing Check =
IF (
(ISBLANK([COP1]) && NOT(ISBLANK([COP1 LMTD]))) ||
(NOT(ISBLANK([COP1])) && ISBLANK([COP1 LMTD])),
"MISSING",
BLANK()
)

 

This new column can be used to conditionally format your data visualization by setting the color to red when the "Missing Check" value is "MISSING". Please note that conditional formatting options depend on the visualization used, but in most cases you can use the "Field value" mode and select the "Missing Check" field.

 

rubayatyasmin_0-1689517080227.png





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

Proud to be a Super User!





View solution in original post

3 REPLIES 3
akerrout
Helper III
Helper III

Thank you, @rubayatyasmin 

It works fine now!

@akerrout good to know. 

 

appreciate the kudos. 





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

Proud to be a Super User!





rubayatyasmin
Super User
Super User

Hi, @akerrout 

 

 

try using || instead of AND

for example:

Missing Check =
IF (
(ISBLANK([COP1]) && NOT(ISBLANK([COP1 LMTD]))) ||
(NOT(ISBLANK([COP1])) && ISBLANK([COP1 LMTD])),
"MISSING",
BLANK()
)

 

This new column can be used to conditionally format your data visualization by setting the color to red when the "Missing Check" value is "MISSING". Please note that conditional formatting options depend on the visualization used, but in most cases you can use the "Field value" mode and select the "Missing Check" field.

 

rubayatyasmin_0-1689517080227.png





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

Proud to be a Super User!





Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors