Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I'm trying to count the number of items from type XYZ that were created on a given day of the week. So basically, my expression should (?) have 2 "if" condition. So, let's say that I'm only counting the items of type 13 that were made on Mondays, the expression would look like:
count(if(ItemType='13',if(weekDay(ItemCreatedDate = 'Mon'), ItemId)))
Now, this obviously does not work... Can anyone provide me some help?
Thanks,
Nic
count(if(ItemType='13' and weekDay(ItemCreatedDate) = 'Mon', ItemId))
or
sum(if(ItemType='13' and weekDay(ItemCreatedDate) = 'Mon', 1,0))
you may need to wrap expression in some aggr() function if using it in a text box .
Try this.
count(if(ItemType='13' and weekDay(ItemCreatedDate) = 'Mon', ItemId))
Regards,
Kaushik Solanki
count(if(ItemType='13' and weekDay(ItemCreatedDate) = 'Mon', ItemId))
or
sum(if(ItemType='13' and weekDay(ItemCreatedDate) = 'Mon', 1,0))
you may need to wrap expression in some aggr() function if using it in a text box .
This one worked perfectly:
count(if(ItemType='13' and weekDay(ItemCreatedDate) = 'Mon', ItemId))
Thank you very much to you both, that was really fast and accurate!
Nic
Hi,
Try this too, you decide which expression is better for you:
count({<ItemType={13}>} if(WeekDay(ItemCreatedDate)='Mon',ItemId,null()))
Regards.