Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello -
Has anyone figured out how to correctly band rows when using row groups? Here is my situation. My report has a Parent Group with ShowDate, and then three child groups of City, Venue and then Details which is grouped on Section. I want my end report to apply row banding across the entire ShowDate group - including any rows which have split into individual Sections. For example, one ShowDate may have 4 sections within it, some may only have 1 section. But the row banding should be applied across that whole group. I have tried numerous variations of IIF(RowNumber("ShowDate") MOD 2 = 0, "LightGray", "White") applied to the entire row, or applied only to the parent and child groups.
I've tried =IIF( CInt(Sum(Fields!ShowDate.Value, "ShowDate").GetHashCode()) MOD 2 = 0, "LightGray", "White" ) and
=IIF( Lookup(Fields!ShowDate.Value, Fields!ShowDate.Value, 1, "ShowDateDataset") MOD 2 = 0, "LightGray", "White" )
Nothing ends up working properly.
This is what I would like it to end up looking like.
Thanks!
Solved! Go to Solution.
Hi,@a68tbird .I am glad to help you.
I conducted the following test and hope it helps you.
Like this?
I have created a matrix
PS: I created the following test data based on the screenshot as I could not exactly reproduce the data structure in your dataset:
In Power BI Report Builder
I create a function
Here is the function code:
Dim currentGroup As Object
Dim currentColor As String ="PaleTurquoise"
Public Function GetRowColor(ByVal group As Object) As String
If Not group.Equals(currentGroup) Then
currentGroup = group
If currentColor = "PaleTurquoise" Then
currentColor = "LightGray"
Else
currentColor ="PaleTurquoise"
End If
End If
Return currentColor
End Function
I created a matrix with the following groupings:
You need to pay attention to the grouping of the matrix
=Code.GetRowColor(Fields!SHOW_DATE.Value)
You can try using the switch statement
I hope the following issue is helpful to you.
URL:
Solved: Conditional Formatting of Fields in Paginated Repo... - Microsoft Fabric Community
Solved: Paginated Report Help - Background Conditional For... - Microsoft Fabric Community
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,@a68tbird .I am glad to help you.
I conducted the following test and hope it helps you.
Like this?
I have created a matrix
PS: I created the following test data based on the screenshot as I could not exactly reproduce the data structure in your dataset:
In Power BI Report Builder
I create a function
Here is the function code:
Dim currentGroup As Object
Dim currentColor As String ="PaleTurquoise"
Public Function GetRowColor(ByVal group As Object) As String
If Not group.Equals(currentGroup) Then
currentGroup = group
If currentColor = "PaleTurquoise" Then
currentColor = "LightGray"
Else
currentColor ="PaleTurquoise"
End If
End If
Return currentColor
End Function
I created a matrix with the following groupings:
You need to pay attention to the grouping of the matrix
=Code.GetRowColor(Fields!SHOW_DATE.Value)
You can try using the switch statement
I hope the following issue is helpful to you.
URL:
Solved: Conditional Formatting of Fields in Paginated Repo... - Microsoft Fabric Community
Solved: Paginated Report Help - Background Conditional For... - Microsoft Fabric Community
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Bravo! That did the trick. I sure hope DEVs are looking into making this easier. I've come from the Telerik paginated report world, and I don't recall having to create underlying code to accomplish this.
Thanks again!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.