Forum Discussion

gomezc73's avatar
gomezc73
Icon for Helper V rankHelper V
6 years ago
Solved

Format Grid

Hello guys,

 

 I need help with this issue.

 

I have this table where an invoice is repeated x times depend how many product it has.

    

VENDORNameInvoice#Amount InvoiceddateProductcantUnitAmount
101012Triple AA20200012508/15/2020Toilet Paper10Box15
101012Triple AA20200012508/15/2020Liquid Soap15Box10
101012Triple AA20200012508/15/2020Toothpaste12Box25
101012Triple AA20200018238/15/2020Water with gas5Box8
101012Triple AA20200018238/15/2020Pepsi 2ltr10Box15
311232AH Services20200022108/15/2020Bath repair1Srv10
311232AH Services20200025808/15/2020Clean services offices1Srv50
311232AH Services20200025808/15/2020Clean services outside1Srv30

 

Is possible give alternating format  by invoice?.

 

By Example, the first three lines has invoice#20200012, then I would like these lines with background Gray.

 

The following two lines has invoice#20200018, then these two lines with without background.

 

Line 6 has invoice#20200022, then repeat the format with background Gray.. etc..

 

Thanks in advance

 

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi gomezc73 ,

     

    Through your thoughts, I thought of another good method which you could try.

     

    1.Create a calculated column sorted according to Invoice#.

    Rank = 
    RANKX ( 'Table', [Invoice#],, ASC, DENSE )

     

    2.Create a measure value, if it is an odd number, it turns gray, otherwise it turns white.

    Measure = 
    IF ( ISEVEN ( MAX ( 'Table'[Rank] ) ), "white", "grey" )

     

    3.Then follow the previous method to add the measure in Conditional formatting.

     

    4.The result is as follows.

     

    You can check more details from here.

     

     

    Best Regards,
    Stephen Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi gomezc73 ,

     

    You can create a measure and use the new 'Conditional Formating' option where you select Format by 'Field Value' and in this you choose the measure shown below.

    You do this for every column.

    Measure = 
        IF( SUM('Table'[Invoice#]) =20200012 || SUM('Table'[Invoice#])=20200022
            ,"grey"
            ,"white"
        )
     

     

    You can check more details from here.

     

    Best Regards,
    Stephen Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • gomezc73's avatar
      gomezc73
      Icon for Helper V rankHelper V

      Hi, thank for the response, it could be a solution but with the real data i can't ask by the invoice# dur i don't know it,

       

      Do you think if this solution could have a variation if I can have in a measure the PRIOR_INVOICE_READ, so the background will be Grey if the invoice read is the same, when it change then backgrud will be white..?.. It is possible? 

       

      Measure =
      IF( SUM('Table'[Invoice#]) =PRIOR_INVOICE_READ
      ,"grey"
      ,"white"
      )

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi gomezc73 ,

         

        Through your thoughts, I thought of another good method which you could try.

         

        1.Create a calculated column sorted according to Invoice#.

        Rank = 
        RANKX ( 'Table', [Invoice#],, ASC, DENSE )

         

        2.Create a measure value, if it is an odd number, it turns gray, otherwise it turns white.

        Measure = 
        IF ( ISEVEN ( MAX ( 'Table'[Rank] ) ), "white", "grey" )

         

        3.Then follow the previous method to add the measure in Conditional formatting.

         

        4.The result is as follows.

         

        You can check more details from here.

         

         

        Best Regards,
        Stephen Tao

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.