Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
gomezc73
Helper IV
Helper IV

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

 

1 ACCEPTED SOLUTION

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 )

1.png

 

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.

2.png

 

4.The result is as follows.

3.png

 

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.

View solution in original post

4 REPLIES 4
v-stephen-msft
Community Support
Community Support

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"
    )
 

11.png12.png

 

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.

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"
)

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 )

1.png

 

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.

2.png

 

4.The result is as follows.

3.png

 

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.

amitchandak
Super User
Super User

@gomezc73 , I doubt that is possible. Try matrix with stepped layout off

https://www.burningsuit.co.uk/blog/2019/04/7-secrets-of-the-matrix-visual/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.