Forum Discussion
Potential bug with date() ?
- 2 years ago
I have the weirdest fix for this ... switch back the regional settings in PBI to the default.
A little annoying, but trying to figure out and fix what PBI messes up in the background is way worse.
The conditions being triggered one after another is fine, as I tried to make them specific for each customer group.
What I intended to do is have switch() evaluate a combination of the customer group code and the current month and then determine when the group will next be up for billing.
For example
, rechnungsgruppe[rechnungsgruppe_pk] IN {43 , 45 , 48} && MTH in {1,2,3}, DATE(YR , 3 , 1)
supposedly means that if the group is 43 or 45 or 48 AND the current month is Jan/Feb/Mar > output March of the current year as next billing.
I tried to streamline and reorder the code a bit so I don't have multiple lines trigger the same date, but I'm still getting the same error. =(
Hi zahlenschubser ,
What is the result you want to achieve? Can you give an example?
Again believe that the problem is the order of the options that will return the incorrect order for the result you want to achieve.
- zahlenschubser2 years agoHelper IV
I have a bunch of customer groups that have different billing cycles. Depending on the cycle I want to get the current next billing period for each group.
1) Every three months, but they start in Jan / Feb / Mar and then +3 months
2) Monthly
3) Half Yearly
4) Yearly
For example
, rechnungsgruppe[rechnungsgruppe_pk] IN {43 , 45 , 48} && MTH in {1,2,3}, DATE(YR , 3 , 1)
supposedly means that if the group is 43 or 45 or 48 AND the current month is Jan/Feb/Mar > output March of the current year as next billing.