Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Diverging format per row data

I have a matrix table as below, I applied a  conditional background to the counts as diverging. I am getting table level formating. IS there a way i can do

for EAST or any Name (row level) formatting. show red at 44 medium yellow 33 and 5 , 4 green

 

 

Name          1 AM   2 AM   4 AM   6 AM

EAST             5          33      4           44

WEST            30        55      7           33

SOUTH          40        44     22         3

NORTH          20         2       4          33

 

I appreciate your time and help.

 

Thanks

 

7 Replies

  • Anonymous , Not very clear. But you can have a color measure and use that in conditional formatting using "Field value" option

     

    Color = if(FIRSTNONBLANK('Table'[Year],2014) <=2016 && AVERAGE(Sales[Sales Amount])<170
    ,"lightgreen",if(FIRSTNONBLANK('Table'[Year],2014)>2018,"red","yellow"))
    Color sales = if([Sales Today] -[sales yesterday]>0,"green","red")

    color =
    switch ( true(),
    FIRSTNONBLANK('Table'[commodity],"NA") ="commodity1" && sum('Table'[Value]) >500,"lightgreen",
    FIRSTNONBLANK('Table'[commodity],"NA") ="commodity2" && sum('Table'[Value]) >1000,"lightgreen",
    // Add more conditions
    "red"
    )

     

    Refer: https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
    https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    According to my understand, you want to set conditional formatting to each row based on 1 AM, 2 AM ,4 AM ,6 AM , right?

    You could use the following formula:

    Measure =
    SWITCH (
        MAX ( 'Table'[Time] ),
        "1 AM", "Green",
        "2 AM", "Yellow",
        "4 AM", "Green",
        "6 AM", "Red"
    )

    Here is the pbix file.

     

    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,
    Eyelyn Qin

    • Anonymous's avatar
      Anonymous
      Not applicable

      Not based on time. Based on group.

       

      for each row conditionaly format the color to low and high count.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous ,

        It seems like you just  want to apply Gradient to values?

         

        In my opinion ,it is temporarily impossible to apply a different gradient for each row.

         

        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,
        Eyelyn Qin