Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Question regarding conditional formatting in Line clustered coloumn chart.

I have 2 different tables, Table 1, with weight of the scrap in each month , Table 2, with total tonnage and target of each month. For example, if my scrap total weight on Jan is X and tonnage of ...
  • v-janeyg-msft's avatar
    4 years ago

    Hi, Anonymous 

     

    According to your description, I think you need to establish the relationship between months first, then you can put the two table fields in one table visual, and create a measure to mark red by using conditional format.

    Like this:

    Measure =
    VAR a =
        SUMX (
            FILTER ( ALL ( Table1 ), [Ref Month] = SELECTEDVALUE ( Table2[Month] ) ),
            [Weight of Scrap in Kg ]
        )
    RETURN
        IF (
            DIVIDE ( a, SELECTEDVALUE ( Table2[Tonnage in Kg] ) )
                > SELECTEDVALUE ( Table2[Target] ),
            "Red"
        )
    

    Did I answer your question ? Please mark my reply as solution. Thank you very much.
    If not, please upload some insensitive data samples and expected output.


    Best Regards,

    Community Support Team _ Janey