Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to get a single column of YearMonth for Count(test). The data for Year and Month are retrieved from two dropdown, year and month. I manage to get the expression to work once but no data is generated. These are some of the code I tried to create but I think it is probably not recognised as date. When I try use makeDate, it just gives me errors about expression.
if(Year=$(Year) & Month=$(Month), '$(=(vYear)&'-'&(vMonth))')
[TestData.autoCalendar.YearMonth] = MakeDate(vYear&'-'&vMonth)
Insofar as the MakeDate() part, it should be something like MakeDate(vYear,vMonth) rather than the concatenated version you've tried to use. Each of the dateparts should be numeric and separated by a comma.
Generally, something along the lines of:
Count({< Year = {$(vYear)}, Month = {$(vMonth)} > } test)
May be the correct approach here.
Sorry, I try the count for both year and month thing but it gives me year count instead.
There's no reasonable way that using the formula suggested would give you the count of years... I'd suggest you double-check that the variable and field names are correct and contain matching values.