Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
helen_pip
Creator III
Creator III

Problem with expression: Do I need to always use count?

Hello

I have an expression whish parses O.K., however the entire expression is underlines in red and does not work

I have previously used the set analysis part with Count( and it works perfecty, but on this occason I do not need a count

I was wondering if someone could kindly help me tailor the expression

 

=Num({$<FactDateNum = {">=$(=v_Start_Date_ED_Reattends)<=$(=v_End_Date_ED_Reattends)"}>}ED_Reattendance_Rate, '%')

Thanks

Helen

1 Solution

Accepted Solutions
Gysbert_Wassenaar

You need to use an aggregation function. Which one depends on what you want to do. You can't use a set modifier in functions like num. Perhaps you can use the only() function:

=Num(only({$<FactDateNum = {">=$(=v_Start_Date_ED_Reattends)<=$(=v_End_Date_ED_Reattends)"}>}ED_Reattendance_Rate), '%')


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
MK_QSL
MVP
MVP

You should have something for aggregation...

i.e.

SUM, COUNT, MIN, MAX, ONLY etc..

Gysbert_Wassenaar

You need to use an aggregation function. Which one depends on what you want to do. You can't use a set modifier in functions like num. Perhaps you can use the only() function:

=Num(only({$<FactDateNum = {">=$(=v_Start_Date_ED_Reattends)<=$(=v_End_Date_ED_Reattends)"}>}ED_Reattendance_Rate), '%')


talk is cheap, supply exceeds demand
Anonymous
Not applicable

Hello, Helen.

Set Analysis always needs an aggregation function like, Count, Min, Max, Sum... Num is only a formatting function.

But there is an "aggregation" that does "nothing". It just returns the value of the filed (if it has only one value per chart row). It is the Only function. You can use Set Analysis with it.

I suppose that's what you want. So, your expression would be:

=Num(Only({$<FactDateNum = {">=$(=v_Start_Date_ED_Reattends)<=$(=v_End_Date_ED_Reattends)"}>}ED_Reattendance_Rate), '%')

Hope it helps.

its_anandrjs

You can try with

=SUM({$<FactDateNum = {">=$(=v_Start_Date_ED_Reattends)<=$(=v_End_Date_ED_Reattends)"}>}ED_Reattendance_Rate)


=ONLY({$<FactDateNum = {">=$(=v_Start_Date_ED_Reattends)<=$(=v_End_Date_ED_Reattends)"}>}ED_Reattendance_Rate)


Or what ever your expression does like any aggregation words