Forum Discussion

BBrak's avatar
BBrak
Advocate I
2 years ago
Solved

Conditional formatting (using DAX?) for cells without data in a Matrix visual

hi all, looking for some help on a problem in Power BI, presumably using DAX.

Suppose I have the following simplified data:

 


In Power BI, I would like to display the table above in a Matrix, with the fields Location, Section and Row placed as Rows, the field Position as Columns and the field Item as Values. Item should not be aggregated but taken 'First' instead. In addition, I would like to (create a DAX measure?) to apply conditional formatting on the background to indicate if no value in the Column Item exists for the combination of fields on Rows (Location, Section and Row) and Columns (Position).

The Matrix would then (conceptually) look something like this:


How can I achieve this? I have tried writing DAX formulas (e.g. 'NoValueIndicator' below) but all my attempts return no value.

Any ideas?

 

Kind regards and many thanks, Bastiaan



  • BBrak You could create a measure Measure = MIN('Table'[Item]) and then a conditional format run that if it is blank, return a color.

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    BBrak You could create a measure Measure = MIN('Table'[Item]) and then a conditional format run that if it is blank, return a color.

    • BBrak's avatar
      BBrak
      Advocate I

      Greg_Deckler that was way easier than I realised. Only needed a minor tweak to get it to work for my actual use case. Thanks a lot!