Hi, I have a problem with cumulative sum line chart, the problem is I think I need to aggr by dimension, but im usin calculated one, and puting it in the formula gives rubbish chart result.
So I'm playin with covid19 data. Columns of interest: date, cases, deaths, country.
Ive calculated on visualisation purposes dimension like:
day_0: =Aggr(nodistinct min({<cases=-{'0'}>}date),countriesAndTerritories)
//marks day with first case confirmed
day_count:=if(
date-Aggr(NODISTINCT min({<cases=-{'0'}>}date),countriesAndTerritories)<0,
0,
date-Aggr(NODISTINCT min({<cases=-{'0'}>}date),countriesAndTerritories)
)
//counts following days from day_0
Then I have a cumulative sum of Cases cinfirmed:
RangeSum(Above(total sum(cases),1,RowNo(total)))
I want to show it as a line chart, with day_count and country as dimensions. When i filter one country its, ok, problem is when i want to show more countries as a series. Then instead of something like that (example from power bi):
![Adnotacja 2020-06-16 195150.jpg Adnotacja 2020-06-16 195150.jpg](https://community.qlik.com/t5/image/serverpage/image-id/35663i83EDDCD8CCA97717/image-size/large?v=v2&px=999)
I get this:
![Adnotacja 2020-06-16 195tgtrr150.jpg Adnotacja 2020-06-16 195tgtrr150.jpg](https://community.qlik.com/t5/image/serverpage/image-id/35664i423D6DE602A8EC6A/image-size/large?v=v2&px=999)
thx for any help 🙂
edit: link to source table:
https://opendata.ecdc.europa.eu/covid19/casedistribution/csv
edit2:
dont know why, but when i convert this chart to pivot table, it works correctly:
![Adnot717.jpg Adnot717.jpg](https://community.qlik.com/t5/image/serverpage/image-id/35720i981C9E2C81675986/image-size/large?v=v2&px=999)