alternate row colors in a break
Some days ago I had the requirement to show alternate row colors in a break.
In fact that I was missing a SCN-Entry about this – there we go:
(I am using BO 4.0)
1. I create a variable RunningSwitcher with following definition:
This gives me a number starting at 1 for each line of one project:
2. next I created a variable ProjectSwitcher with following definition:
This variable gives me the same number for each project starting by 1:
3. a variable which checks if the ProjectSwitcher is even or odd to get one number for each even row and another for each odd row:
4 & last step: I created a conditional formatting on the last variable which just set a gray background color if the row number is 0:
As a result I got this:
Hope that helps,
Great Webi trick !
You've been added to Webi 4.x tricks : summary for a better visibility. Keep posting !
Nice trick,,but it is applied only for that column not in row,plz give your suggestion how i can do...
Hi, you have to add this Conditional Formatting to each Column.
then how to do..plz suggest
Coditional formatting only we have apply right?
Conditional Formatting = Alters in BO 4.x
So just click on each column of your table and check the box for RowColor-alert.
Hope that helps
thank you for your reponse,i got it,,
It's nice trick to get the alternate row color based on the dimension values.
I had same issue and resolved by using below variables and wants to share
Curr Value : =[Location]
Prev Value: =If(IsNull(Previous([Location]));[Location];Previous([Location]))
Variable 3: (to distinquish the dimension values alternatively)
Alternate Color: =If([Curr Value]=[Prev Value];(0+Previous(Self));If((Previous(Self))=1;0;1))
Applied Aleter on based on the Alternate Color variable and achieved the required result.
Hope it is useful.
Nice Idea.. Keep Posting.
I am a fan of brevity and don't like to create lots of functions where I don't need to. Therefore I do something like this:
Starting from the outside in, the runningcount should ignore the bidder and quote columns to just give us the same as step #2 above. We then add 1 to this and check (using the mod function) if this number is divisible by 2. If it is, it's an even row and we return a 0. If it's not, we return a 1. This will then give you an output the same as step#3, leaving you free to perform the conditional formatting via an alerter.
Nice and concise 🙂
NICE TRICK 🙂 COOL ...HOPE YOU KEEP POSTING
Thanks for sharing.
This is nice feature indeed. I accomplished this functionality creating simple variable with formula:
=Mod(RunningCount([Some dimension]) In Break;2)
Afterwards used this variable in creating conditional formatting rule. Hope this helps.
Why don't you guys use Odd or Even formula for this problem.
That's how i did it.
1. I created the variable below:
2. I created the Conditional Formating below:
..because sometimes you want to apply the formatting based on a particular dimension and not just a simple odd / even row number, as in the original post.
Thanks, Andreas. This is very helpful!
Thanks, Andreas. You Saved me.Please Keep posting