Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I have been searching for this for a while and cant take it. I have a bar chart that shows tons soled for month.
As we need for other porpouses all years data, but for this chart only this year data we use this formula as measure
sum( {$<Date={">=$(=timestamp(yearStart(Today())))<=$(=timestamp(yearend(Today())))"} > } [Tons sold])
And the value of month as dimensión.
I want that the bars take red or green color if they are (the value of the bar) bigger of certain value.
I mean maybe Januari and Agust must be in red and the rest of the chart in green.
I thik I have to use color by expresión, but when I put the expresión
if(sum([Tons sold])>xValue,red(),green())
All the bars turn green couse is taking all the Tons sol in all time to compare.
Use the same expression in the if statement:
if(sum( {$<Date={">=$(=timestamp(yearStart(Today())))<=$(=timestamp(yearend(Today())))"} > } [Tons sold])>xValue,red(),green())
Use the same expression in the if statement:
if(sum( {$<Date={">=$(=timestamp(yearStart(Today())))<=$(=timestamp(yearend(Today())))"} > } [Tons sold])>xValue,red(),green())
Tryed that too and I have the same problema, all the bars ahve the same value, red or green if the total amount of tons sold this year is bigger or smaller than xValue
My bad, checking with wrong value