Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello, i need help.
I have this data table,
compare the CTP_MT_CAPITAL value for the current month with the CTP_MT_CAPTAIL value of the previous month
the goal is to see if there was only an increase or a decrease in the CTP_MT_CAPITAL and highlight it in another column.
Hi @cedfoning,
you can highlight fields in a pivot table based on the previous column (i.e. month) in the same row.
Use the background color expression in the pivot table measures and type in a formula like this:
=if(before(sum(COST),1) < sum(COST), rgb(255, 0, 0))
The result is that the field gets highlighted in red if there was an increase.
How to find the background color expression:
Result:
Hope this helps. Feel free to reach out if you have further questions.
Hello, thanks for your answer
lets take your example : for the line A, i need to have the difference if there is any increase or decrease of cost.
in that case, it will be 10-5 = 5
i don't care if :
- the numbers are equal
i only care if there is an increase or decrease of the cost.
hope i'm clair
thanks
Okay, understood.
You may want to use the before() function in your measure.
It works like this:
Then we can remove the column with the actual values to only see the variation in respect to the previous column:
The formula I used in the measure is this:
=sum(COST) - before(sum(COST), 1)
If this answers your question, please give it a thumbs up and mark as solution.
Hello,
thanks for your reply
That's what i did.
I wanted to have a total for each queue. For Queue A, 6-10+5
Tried to add the column total but can't have the total
is there any way we can do it in the script ?