Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to show last 30 days of data in QlikView in line chart. But the expression that I have tries is not working. I have the excel file that has the data with Date, Type, Value, and Country.
My dimension is: Date
My expression is:
Sum({$<TypeQC={"External NC"}>+1<CountryQC={"Italy"}>+1
<DateQC = {"$(='>=' & Date(Max(DateQC)-30, 'DD-MMM-YYYY') & '<=' & Date(Max(DateQC), 'DD-MMM-YYYY'))"}>} ValueQC)
I have the values from July to October and I want to show data for past 30 days only from today but my chart is showing values of all dates.
In the below screenshot the expression is showing correctly as >=14-Sep-2020 to <=14-Oct-2020 as maximum date in the excel file is 14-Oct-2020. But I don't understand why the July, August values are populating in the table and chart.
Below is the screenshot of the excel file. If you look at the September 2 data, there are values 2 in Internal NC and 4 in External NC but in the expression I have given the condition as TypeQC="External NC". But instead in the table it is calculating both internal and external and giving the data as 6. This is one more problem that I am facing.
Can anyone please help me? @sunny_talwar can you please let me know what mistake I am doing in the expression?
Try like below
Sum({$<TypeQC={'External NC'},CountryQC={'Italy'},DateQC = {"$(='>=' & Date(Max(DateQC)-30, 'DD-MMM-YYYY') & '<=' & Date(Max(DateQC), 'DD-MMM-YYYY'))"}>} ValueQC)
Try like below
Sum({$<TypeQC={'External NC'},CountryQC={'Italy'},DateQC = {"$(='>=' & Date(Max(DateQC)-30, 'DD-MMM-YYYY') & '<=' & Date(Max(DateQC), 'DD-MMM-YYYY'))"}>} ValueQC)
Hi @MayilVahanan . Thanks a lot for your solution. I tried the expression and it worked as I expected. The mistake that I did was basically using +1 in the expression and using wrong ".
Thank You,
Hari