Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys im confused why a simple expression to get the last 6 month data wont bring me any results
i have a master calender the one below
Qlik sense represents the date Field as '18/02/2020'
I have a simple expression to get the last 6 month data but it wont yield any results.
Count({$<_DataSource_F_Call$(vLiz_Set_SnapshotSwitch)={1},_ChannelCriteria={1},_IndividualCustomer={1},Timeframe={MTH},$(vLiz_Set_Territory),Product=, Date = {'>=$(=addmonths(today(),-6))'}>} DISTINCT Contact_Cnt)
but I do get the last 6 month data if i use this
Count({$<_DataSource_F_Call$(vLiz_Set_SnapshotSwitch)={1},_ChannelCriteria={1},_IndividualCustomer={1},Timeframe={MTH},$(vLiz_Set_Territory),Product=,
Month= {
"$(=Month(addmonths(Today(),-6)))",
"$(=Month(addmonths(Today(),-5)))",
"$(=Month(addmonths(Today(),-4)))",
"$(=Month(addmonths(Today(),-3)))",
"$(=Month(addmonths(Today(),-2)))",
"$(=Month(addmonths(Today(),-1)))",
"$(=Month(Today()))"
},
Year = {"$(=Year(Today()))"}>} DISTINCT Contact_Cnt)
can anyone tell me why or help
Thanks
Fixed with the below codeas en example for 12 month
Count({$<_DataSource_F_Call$(vLiz_Set_SnapshotSwitch)={1},_ChannelCriteria={1},_IndividualCustomer={1},Timeframe={MTH},$(vLiz_Set_Territory),
Date = {">=$(=date(addmonths(today(),-12),'DD/MM/YYYY'))"} >} DISTINCT Contact_Cnt)
try with double quotes
Count({$<_DataSource_F_Call$(vLiz_Set_SnapshotSwitch)={1},_ChannelCriteria={1},_IndividualCustomer={1},Timeframe={MTH},$(vLiz_Set_Territory),Product=, Date = {">=$(=addmonths(today(),-6))"}>} DISTINCT Contact_Cnt)
it works if I remove the equal sign
Date = {">=$(addmonths(today(),-6))"}
instead of
Date = {">=$(=addmonths(today(),-6))"}
only problem is if I don't have the current year in selection it includes data from previous year
What do you want to achieve?
I just need to count the last 6 month from today and the last 24 month from today, without selecting the year
Fixed with the below codeas en example for 12 month
Count({$<_DataSource_F_Call$(vLiz_Set_SnapshotSwitch)={1},_ChannelCriteria={1},_IndividualCustomer={1},Timeframe={MTH},$(vLiz_Set_Territory),
Date = {">=$(=date(addmonths(today(),-12),'DD/MM/YYYY'))"} >} DISTINCT Contact_Cnt)