Skip to main content

COUNT(CASE

WHEN DAYS_BETWEEN(ROUND_DAY(<%= Earlier_Date %>),ROUND_DAY(CASE WHEN TO_TIMESTAMP('<%=date_to%> 23:59:59', 'YYYY-MM-DD HH🇲🇲SS') > TODAY()

THEN TODAY()

WHEN TO_TIMESTAMP('<%=date_to%> 23:59:59', 'YYYY-MM-DD HH🇲🇲SS') <= TODAY() 

THEN TO_TIMESTAMP('<%=date_to%> 23:59:59', 'YYYY-MM-DD HH🇲🇲SS')

ELSE TODAY()

END)) > 60 

THEN "CASES"."_CASE_KEY"

 

ELSE NULL END)/COUNT("Total Average"."Total")

Hello Pradumma,

 

Like it says on the error, it doesn't allow to use an aggregator and a dimension so you have two options:

 

  • Change aggregation for a PU function, instead of using COUNT use PU_COUNT, in your case something like PU_COUNT(DOMAIN_TABLE("CASES"."_CASE_KEY"), CASE WHEN.......) should work for you.
  • Uso 2 aggregators: change denominator and calculate the average instead if putting the dimension column that has that avg. Something like AVG(total). This might not be possible as I don't know what data is in that table and if the average can be calculated form other data.

 

 

Hope this helps you solve the issue. 

For any further questions do not hesitate to ask.

 

Best regards,

Pablo

 


Reply