Forum Discussion
Conditional format is not displayed
Hi Jan_Trummel ,
You can use the NATURALLEFTOUTERJOIN function to create the following table, and then use the conditional formatting in the table to match your actual scenario.
status =
IF (
ISBLANK ( MAX ( 'Table'[Value] ) ),
"yellow",
IF ( MAX ( 'Table'[Check] ) = "OK", "green", "red" )
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello Anonymous,
thank you for your answer! This is definitely a possible solution to achieve a goal!
However, I am creating a new table in the model, which means that Power BI has to save the data twice.
My ideal solution would be to use a measure to get Power BI to display the conditional formatting for the data set with ID 4713.
To think very naively: I would need a logic that writes a 1 if the Check column says "OK", otherwise a 0. I would no longer have to access the Check column via the First method.
I created this measure for that:
Show =
IF(
SELECTEDVALUE(Data[Check]) = "OK",
1,
0
)
However, if I drag this measure into the table visualization, I destroy the JOIN between the two tables. Power BI then creates the Cartesian product, that means it connects every record from the Data table with every record from the Details table:
The measure creates the Cartesian product ("Show items with no data" is activated)
If I deactivate the option Show items with no data, then at least the rows in which Power BI does not output any conditional formatting are removed.
If I deactivate "Show item with no data" I still get the Cartesian product (but at least fewer lines)
Do you have any idea how I can create the logic described above in a measure without Power BI creating the Cartesian product?