Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I am trying to count values by year but its not giving me the count for 2018.
Can you please advise me where I am having the issue,
lease see the attached QVW file.
Result | F2 | 2017 | 2018 |
EM+ | 1-14 | 1 | 0 |
EM+ | 1-20 | 0 | 0 |
EM+ | 10-17 | 1 | 0 |
EM+ | 14-29 | 1 | 0 |
EM+ | 2-11 | 1 | 0 |
EM+ | 2-3 | 1 | 0 |
EM+ | 26-30 | 1 | 0 |
EM+ | 3-10 | 1 | 0 |
EM+ | 3-11 | 1 | 0 |
Kind regards,
Farrukh
Your MaxYearmonth is 15/12/2017 which you use in the calendar to create Years, so there is no 2018
it seems you refer to the the wrong table for the min and max date, so I wonder how there are values for those variables/fields at all with your script in the attached qvw
let varMinDate = num(peek('MinYearMonth',0,'Facts'));
let varMaxDate = num(peek('MaxYearMonth',-1,'MinMaxDate'));
You don't have data for Year 2018
Your MaxYearmonth is 15/12/2017 which you use in the calendar to create Years, so there is no 2018
it seems you refer to the the wrong table for the min and max date, so I wonder how there are values for those variables/fields at all with your script in the attached qvw
let varMinDate = num(peek('MinYearMonth',0,'Facts'));
let varMaxDate = num(peek('MaxYearMonth',-1,'MinMaxDate'));
Hi Sunny,
Thanks for highlighting this. Now its giving me the counts.
But is there any possibility that year column can be dynamic.
Use this for Max Year (2018)
Year = {"$(=Max(Year))"}
For Max Year - 1 (2017)
Year = {"$(=Max(Year)-1)"}
Thanks a mil Sunny!
Hi Sunny,
Sorry for coming back to this again. I am using the below expression but below highlighted giving me blank row. not returning any value.
Variable:
Draw_EM = if(GetSelectedCount(Draw) > 0 , GetFieldSelections(Draw), 'EM+')
=Aggr(Only({$<Draw={"=$(=Draw_EM)"}, Period={">=$(=vPeriod_EM)"}>} Draw), Draw)
Can you please advise me where I am having the problem.
Kind regards,
Farrukh