Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Conditional Formatting on Items with no Data

I'm currently trying to insert icons into a table visual based on a specific status fields (Green, Yellow, Red). The underlying data is setup such that there's a parent table, a relationship table and a child table. The status is in the parent table and I'm using a SWITCH column to assign icons accordingly. Within the table visual, I am using conditional formatting and using that field to show the icons. This works out fine for parents with children. 

 

The issue I'm having is not all parents have children, but I would like to display them all anyway. I'm using the "Show items with no data" option, which is working, but the conditional formatting doesn't seem to be applying itself to these records.

 

Am I setting this up wrong, is there a better way to accomplish this?

5 Replies

  • V-lianl-msft's avatar
    V-lianl-msft
    Community Support

    Hi Anonymous ,

     

    Do you mean items with no data in the matrix?

    We are doing conditional formatting for Value,there may be blank rows in the matrix but the value is not blank.

    This may make us think that the conditional formatting is invalid.

     

    Best Regards,
    Liang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • edhans's avatar
    edhans
    Community Champion

    I'd have to see more of what you are referering to via an image to more fully understand, but on the face of it, if there is no data, there is nothing to conditionally format, right? Maybe you should replace blanks with a space or zero, then apply conditional formats accordingly?

    =COALESCE(ISBLANK([MyField]), " ")

    That will return a space where there are blanks. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for the quick replay, in trying to mock up a sample for you, I've come to realize I think my entire understanding of Show Items with no Data is flawed. I'll need to redo this report, as I was trying avoid flattening the data too much with Merge operations, but I think since I want this Outer join I'll have to do it that way.

      • edhans's avatar
        edhans
        Community Champion

        There are valid uses for "show items with no data" but it can be over used. Nothing is a substitute for a well thought out model through some good transformations. I've tried to take shortcuts too many times myself.

         

        I'd say I spend 60-85% of my time in Power Query getting a good model ready. 

         

        Then I spend the other 80% of my time in DAX. 😁

  • I have this problem, with what I believe to be a valid use case.

     

    To generalize, say I have items in a store, and I want a table that lists the name of the item, and, say, the number of orders. I conditionally format the name of the item to link to its page.

     

    The link is not clickable if there are no orders for that item yet, even if that URL is valid an in the same table as the name of the item. The orders are stored in another table (as they should be).