cancel
Showing results for
Did you mean:
Highlighted
Post Patron

## return blank if the column is blank

Dear Community,

I have two question.

i.) If number <=4 , return false . More than it will be true. I get the Dax. But I do not want the blank value in DiffDay return anything. But this DAX return false to the blank value.

True/False = IF(SubBV[DiffDay]<=4, "False", IF(SubBV[DiffDay]>=5, "True" ))

ii.) Would like to have a conditional table formatting for TRUE/FALSE column blackground colour. If false will get green, while true will be red.
I have go thru some article and follow their instruction to perform. But its return some of the false column I get red.

Appreciate and thanks for the help.
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV

@NickProp28 , I forgot My own suggested solution. Check now.

Proud to be a Super User!

7 REPLIES 7
Highlighted
Super User IV

@NickProp28 , the formula seems fine. It is column check what value you have taken sum/min/max. Because on the color it will take aggregation.

You can also try a color measure and use that using "Field Value"

if it is a column

Color = IF(sum(SubBV[DiffDay])<=4, "Green", "Red")

It is measure
Color = IF([DiffDay]<=4, "Green", "Red")

Proud to be a Super User!

Highlighted
Post Patron

Dear @amitchandak ,

Thanks for ur prompt response. Yes, i able to get the correct colour after change from sum to min.

But do you have any idea on my another question?
If Datediff less than or equal to 4 day will return false, while more than will be true.

And if datediff is blank, i do not want it to return anything. Just remain as blank.

But this DAX

True/False = IF(SubBV[DiffDay]<=4, "False", IF(SubBV[DiffDay]>=5, "True" )),
will return false if datediff is blank.
Highlighted
Super User IV

@NickProp28 , for blank you can try like

Switch(true(),
isblank(SubBV[DiffDay]), blank(),
SubBV[DiffDay]<=4, "False"
SubBV[DiffDay]>=5 ,"True"
blank())

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Proud to be a Super User!

Highlighted
Post Patron

Dear @amitchandak ,

Here the pbix : https://ufile.io/sd52jjtx
Please take a look on the dataset.

Highlighted
Super User IV

@NickProp28 , I think is happening because there multiple values job ID. so they adding up. I plotted it with unsummarized option and it worked

Please find the attached file after signature

Proud to be a Super User!

Highlighted
Post Patron

Dear @amitchandak ,

In you pbix,

Datediff still fall into 'false' categories. I would want if datediff is blank, in the True/false column remain blank.
Is it possible to do it? I tried many ways but still categories in 'false'.

Highlighted
Super User IV

@NickProp28 , I forgot My own suggested solution. Check now.

Proud to be a Super User!

Announcements

#### Power Platform Community Conference

Check out the on demand sessions that are available now!

#### Microsoft Power Platform Communities

Check out the Winners!

#### Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors