Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've created a Pivot Chart. I need to sum all values in a field up to selected year for the selected dimension.
For example, if user selects year 2017, the values in field Inception should be summed up for years 2016 and 2017, assuming available data starts in year 2016. If user selected year 2018, values in field Inception should be summed up starting in 2016, 2017 and 2018; etc.
Sample data in attached file.
Assuming you have Year field available.
Create variable vSelectedYear and put below in value
=max(Year)
In Pie chart, put expression like below
= sum({<Year ={"<=$(vSelectedYear)"}>}Sales)
Assuming you have Year field available.
Create variable vSelectedYear and put below in value
=max(Year)
In Pie chart, put expression like below
= sum({<Year ={"<=$(vSelectedYear)"}>}Sales)
Not working. 😞
I've tried all of these options, but none have worked.
=sum({<FiscalYear={"<=$(vSelectedYear)"}>}Inception)
=sum({<FiscalYear={"<=$(=max(FiscalYear))"}>}Inception)
=Sum({<FiscalYear={">=$(=Min(FiscalYear))<=$(=Max(FiscalYear)+1)"}>}Inception)
Hi,
Try the below expression.
=Sum({<FiscalYear={">=$(=Min({1}FiscalYear))<=$(=Max(FiscalYear))"}>}Inception)
Thanks,
Jesh
what is the format of FiscalYear? Make sure it is number format. Try to check max(FiscalYear) value in text object or KPI object(qlik sense)
Hi, I was using the year field in the calendar table for the Years List Box. Now I'm using the Year field in the fact table, which works precisely.
Thanks!