Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Rama1
Contributor II
Contributor II

how to color subtotals in pivot table

hi,

Need some help to color subtotals in pivot table.

In my Pivot table  i have 2 dimensions as rows and 1 dimension as column  and 1 measure .

my measure is Count({<[WeekSerial]={">$(=max(WeekSerial)-6)<=$(=max(WeekSerial))"}>} [Office])

my Pivot table look like this:

Rama1_0-1604551644817.png

now i am coloring the totals with the the expression If(Dimensionality() = 0, RGB(203,209,225)) to color the totals row and it is working and now i want to color the subtotals in the above table. Can anyone help me how can i achieve this?

Thanks in advance.

 

 

1 Solution

Accepted Solutions
MayilVahanan

Hi @Rama1 

Try with Rowno() function like below. 

=If(Dimensionality() = 0, RGB(203,209,225), If(RowNo()=0, Red()))

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

4 Replies
MayilVahanan

Hi @Rama1 

Try with Rowno() function like below. 

=If(Dimensionality() = 0, RGB(203,209,225), If(RowNo()=0, Red()))

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Rama1
Contributor II
Contributor II
Author

Thank you so much for your response @MayilVahanan .

and i achieved what i want with the help of your solution, but is there any way to color only subtotals in the above table without background color along with my expression(this expression i need to color the totals with background color)

 =If(Dimensionality() = 0, RGB(203,209,225)

Thanks in advance

Rama

Rama1
Contributor II
Contributor II
Author

hi, i achieved what i want. Thank you so much

heiligenschein
Contributor II
Contributor II

Hi,

how did you achieve to color only the total rows without the other rows? I've been looking for this function for a long time.