Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I have a hard time with calculating a dimension with day count from specific date. I need it to use it later as as axis on chart.
So for example on covid-19 data, I've calculated a day 0 for every country dimension with:
it counts only for the top date.
neither
data-Aggr(min({<cases=-{'0'}>}date),countriesAndTerritories)
Hi BlazkoG,
The reason you see only one record as output is aggregation of aggr function does not perfectly match to the the table use.
To allow your aggregation to repeat, you can use NODISTINCT in Aggr function.
data-Aggr(NODISTINCT min({<cases=-{'0'}>}date),countriesAndTerritories)
I hope this solves your problem.
First condition can print more data than second condition due to interval ().
Hi, thank you for the reply, but I dont understand.
Both formulas give same result. Only for max date, rest is null.
What is the expected output?
Hi, column test (with date) minus the day 0. So below the 103 value, would follow 102, 101, 100 etc. I need this as a dimension, to further use it as a axis in a chart
Both test and day0 are dimension or expressions?
day0 is a calculated dimension, 'test' is a data loaded from dataset.
what is expression for day0?
Hi BlazkoG,
The reason you see only one record as output is aggregation of aggr function does not perfectly match to the the table use.
To allow your aggregation to repeat, you can use NODISTINCT in Aggr function.
data-Aggr(NODISTINCT min({<cases=-{'0'}>}date),countriesAndTerritories)
I hope this solves your problem.
Yes! Thank You! That solves it 🙂