Forum Discussion

Grella's avatar
Grella
Frequent Visitor
2 years ago

Measure for conditional formating with more than 1 condition and using columns from related tables

I am trying to create a measure (i'm not sure if a measure or calculated column is what i should be using) that will ultimately be used purely for conditional formatting. I know how to navigate the conditional formatting settings however i need the measure to use as the "rule".

 

I have 2 related tables: StoreSales (sales revenue from stores) and dStore (includes store status, open/closed, and store close down date if it is closed etc).

In a matrix table visual i want to conditionally format cells as follows:

 

- if store status is closed and store close down date is less than sales month, then 1 (trying to visually highlight months when the store closed down eg. Arlington Heights)

- if store status is open and sales month is blank, then 2 (trying to highlight months where there were no sales at all eg. Lakeland)

 

 

 

I've found various solutions online using SWITCH TRUE() or IF statements that look to work in theory but i can't replicate as dax intellisense will not pick up my table columns and will only let me use measures - no doubt I am doing something wrong!

 

Any help would be appreciated 🙂 

 

EDIT: Link to pbix and supporting files here

 

6 Replies