Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
viraj007
Contributor
Contributor

Before function and conditional formatting with Pivot

Hi Experts

i have a pivot table. The columns are grouped as Year, Quarter and months. I have applied conditional formatting to apply color for the pivot cells, by comparing previous cell value (using Before() ). 
When the pivot is grouped, the conditional formating works good for 2nd and 3rd month in a quarter. For the 1st month in the quarter, no formatting is applied.

ideally i would like the formatting to apply while retaining grouping as well

will be great if you can guide.

 

viraj007_0-1682600127106.png

 

Labels (2)
1 Reply
Chanty4u
MVP
MVP

Try something below 

if(Quarter = Before(Quarter), 

    if(Month > Before(Month), lightgreen(), lightcoral()),

    if(Month > Before(Month) or (Month = 1 and Before(Month) = 12 and Year = Before(Year)), lightgreen(), lightcoral())

)