Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have created a table, and the results is
FirstOrderCalendar.Month Name | count(order) | =monthname(AddMonths([FirstOrderCalendar.Month Name], 1)) |
---|---|---|
0 | ||
Jan 2013 | 0 | Feb 2013 |
Feb 2013 | 0 | Mar 2013 |
Mar 2013 | 0 | Apr 2013 |
Apr 2013 | 0 | May 2013 |
May 2013 | 0 | Jun 2013 |
Jun 2013 | 0 | Jul 2013 |
Jul 2013 | 0 | Aug 2013 |
Aug 2013 | 0 | Sep 2013 |
Sep 2013 | 0 | Oct 2013 |
Oct 2013 | 0 | Nov 2013 |
Nov 2013 | 0 | Dec 2013 |
Dec 2013 | 0 | Jan 2014 |
If i select on the table FirstOrderCalendar "Feb 2013", it's working, I have my count of orders
FirstOrderCalendar.Month Name | count(order) | =monthname(AddMonths([FirstOrderCalendar.Month Name], 1)) |
---|---|---|
16450 | Mar 2013 | |
Feb 2013 | 16450 | Mar 2013 |
What's wrong with my set analysis ?
Why when I unselect Feb 2013 I have only 0 orders
=> Set analysis :
count({$<[SalesCalendar.Month Name]={'$(=only(DISTINCT monthname(AddMonths([FirstOrderCalendar.Month Name], 1))))'}>} [Order ID])
You're better off using an if statement here, such as:
count(if([SalesCalendar.Month Name]=monthname(AddMonths([FirstOrderCalendar.Month Name], 1)), [Order ID]))
Hope this helps!
Hi Adrien,
Did you tried with:
count({$<[SalesCalendar.Month Name]={'$(=only(DISTINCT [FirstOrderCalendar.Month Name]'}>} [Order ID])
Yes I tried and still have 0...
hi Adiren
and with a little = sign just before $
Chris
Thanks for your answers, but I don't think it's a problem of = because it's working when I select one month (Table 2) - I think it's a problem when I have more than one month, set analysis doesn't work!
Any ideas ? 😕
As you are using "only" in the set analysis which means the expression will be evaluated only if one value of that field is selected.
You're better off using an if statement here, such as:
count(if([SalesCalendar.Month Name]=monthname(AddMonths([FirstOrderCalendar.Month Name], 1)), [Order ID]))
Hope this helps!
yeah it's working !
thanks