Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the below formula for Invoice count.
There is a filter bar on the top of the page which has [Year Month] and other filters. If there is no selection in [Year Month]; the below formula shows the information for the current month. (Line No1).
When there is a selection in [Year Month] let say Jan-2017, the formula shows the value for that month. (Line 2).
What changes I have to make in the below formula so that it shows data for multple selection in [Month Year] filter. Let say Jan-2017 and Feb-2017 and more.
If(getselectedcount([Month Year])<1,
Count({$<[YearMonth No]= ,[Year] = ,[Month No]=,[Month Year]=,[Month]=,[MonthID]= {"$(=((Year(Today()) -1)*12) + Num(Month(Today())))"}>} [Invoice No])
,
Count({$<[YearMonth No]= ,[Year] = ,[Month No]=,[MonthID]=,[Month]=,[Month Year]= {"$(=getfieldselections([Month Year]))"}>} [Invoice No])
)
I think it will work if you simplify the second line, give it a try:
...
Count({$<[YearMonth No]= ,[Year] = ,[Month No]=,[MonthID]=,[Month]=>} [Invoice No])
...
this brings the count for all. Not what is required.
Saying "second line" I mean your 2nd expression i the if() statement. The full expression will be:
If(getselectedcount([Month Year])<1,
Count({$<[YearMonth No]= ,[Year] = ,[Month No]=,[Month Year]=,[Month]=,[MonthID]= {"$(=((Year(Today()) -1)*12) + Num(Month(Today())))"}>} [Invoice No])
,
Count({$<[YearMonth No]= ,[Year] = ,[Month No]=,[MonthID]=,[Month]=>} [Invoice No])
)
I also assume that the filter [Year Month] and the field [Month Year] in the if() condition is the same field, just a typo in your opening post (?)
Why not just use
Count( [Invoice No])
in the else branch of your if() function? What should the set analysis do other than the selections would do anyway?
Still facing issue, Can you elaborate more. If Jan-2017 selection happened what is the output you want to show?