Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello! Can you tell me please, what am doing rong? I wanted the line to be blue if the debt is >0 and red if <0
=ColorMix1(if(Sum(debt)>=0,0,1),LightBlue(),red())
You can use the rangesum(above()) expression in the background color to handle expressions where you are using 'full accumulation'. You can also use the rangesum(above()) expression in lieu of the sum( field) with full accumulation in the expression formula as well. Your choice.
In the attached example, i used the latter and in the background color.
Let me know if its accumulating and coloring as you want.
Presentation Tab
Click on + sign on your expression
Write below in Background color
IF(SUM(debt)>0,Blue(),Red())
Is this formula performed on the dimension on the expression ? For dimensions, you may need to aggregate by date using aggr()
Also consider a simpler formula
if(Sum(debt)>=0,LightBlue(),red())
its performed on the expression, the colour af background .. but it works strange.. the colour is changed not by passing nul...
Manish, the problem is that i did that way, but it doesnt work correctly=(
Your sample data or sample apps would be helpful to give you correct answer...
Are your numbers in the data model cumulative totals ? Is the expression formula also sum(Sales) or something different ?
Yes, it is cumulative totals and the expression formula is also sum(debt)
You may need to sum up all preceding values as well then
Consider replacing Sum(Debt) with the following that would aggregate all previous values.
rangesum(above(Sum([debt]),0,rowno()))
i didn't really undestand , if i should put it in the expression, or in the backround colour as well?
Anyway, understood thats its not the best way to show debts, bars are more effective.. and though in a bar chart it clear, whats below zero, and whats above, its still interesting to make different colours..
Could you kindly look at my app, please?