Skip to main content

I tried something along the line of

( PU_COUNT(target_table, source_table.column))/SUM(PU_COUNT(target_table, source_table.column))

 

But I got an error saying:

"The aggregation function SUM cannot be used together with a dimension function input. Please check that there are no aggregations and dimensions used together as function inputs"

Hi @mohamed.ruzli.moham ,

 

I'm not fully understanding what you're trying to achieve.

 

I'm guessing you either want to:

  1. remove the 'PU_COUNT' in the second half of your PQL formula
  2. Try to add 'AVG()' to the first part, but I doubt whether that will work, and whether it is what you're looking for.

 

If both my suggestions don't acchieve what you want, could you try to clarify what your want to divide with what exactly?


Hi @mohamed.ruzli.moham ,

 

I'm not fully understanding what you're trying to achieve.

 

I'm guessing you either want to:

  1. remove the 'PU_COUNT' in the second half of your PQL formula
  2. Try to add 'AVG()' to the first part, but I doubt whether that will work, and whether it is what you're looking for.

 

If both my suggestions don't acchieve what you want, could you try to clarify what your want to divide with what exactly?

Hi @joos.buijs ,

 

To further clarify I have done a PU_COUNT certain elements to group them properly

No I want to find a way I can get a percentage amount for it based on the category that I aggregated it for

So I need to grab each element from the aggregated column and divide it by the total of that column and multiply by a 100 to get a percentage value

Hopefully this makes sense


Hi @joos.buijs ,

 

To further clarify I have done a PU_COUNT certain elements to group them properly

No I want to find a way I can get a percentage amount for it based on the category that I aggregated it for

So I need to grab each element from the aggregated column and divide it by the total of that column and multiply by a 100 to get a percentage value

Hopefully this makes sense

Based on this, would changing the second 'PU_COUNT' in 'PU_SUM' be a solution?

 

Kind regards,

Jan-peter


Reply