Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm displaying data on chart by writing a simple expression - Avg(Population)
What should be the expression if I want to show data corresponding to following condition:
if(date<X)
Avg(Population)
That is, Avg(Population) should be calculated and shown for the dates less than X
if(date<Date#('1/1/2014','MM/DD/YYYY'),Avg(Population))
Avg(if(date<X,Population))
You can go for set analysis
Avg({$<Date<X>}Population)
By mistake I could not ask what I actually meant. I want a conditional expression for showing Avg(Population) for dates less than X.
For example, if I have population value at 3 different dates (W, X, Z), I would like to show Avg(Population) for all the dates less than X. Average value should not include population value at Z.
If you have only one expression, then try any of the above suggested solutions and select "Suppress zero values" on Presentation tab
let vDate=date(max(date))
avg({<date={"<=$(vDate)"}>}population)
cheers,
kunal bhattacharjee