Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
neerajthakur
Creator III
Creator III

Set Analysis and Variable

This is my variable vTotalFootfall

[Morning (10AM - 1PM)]+[Afternoon (1PM - 4PM)]+[Evening (4PM - 8PM)]+Sum([Night (8PM - 10PM)]

 

This is my Master Item

Sum({<Year={$(vYear)}>}[vTotalFootFall])

This is incorrect, I want to use my variable here to calculate footfall on date selection. How can I achieve this?

Thanks & Regards,
Please Accepts as Solution if it solves your query.
1 Solution

Accepted Solutions
marcus_sommer

The call of the variable isn't correct and it should look like:

Sum({<Year={$(vYear)}>} $(vTotalFootFall))

Beside this the last part of your variable contains a sum() and with it you tries to nest aggregations without setting them into an aggr() and further the closing bracket of the function is missing.

Another point you are using something like a + b + c. If any of the operands didn't contained a valid numeric value the whole result on this row-level will be NULL. If this isn't wanted you should use: rangesum(a,b,c).

Further it looked that your time-buckets are distributed within multiple fields. In the majority of the use-cases this has more disadvantages as benefits and so it could be more suitable to transform it into a stream-data structure.

- Marcus

View solution in original post

2 Replies
marcus_sommer

The call of the variable isn't correct and it should look like:

Sum({<Year={$(vYear)}>} $(vTotalFootFall))

Beside this the last part of your variable contains a sum() and with it you tries to nest aggregations without setting them into an aggr() and further the closing bracket of the function is missing.

Another point you are using something like a + b + c. If any of the operands didn't contained a valid numeric value the whole result on this row-level will be NULL. If this isn't wanted you should use: rangesum(a,b,c).

Further it looked that your time-buckets are distributed within multiple fields. In the majority of the use-cases this has more disadvantages as benefits and so it could be more suitable to transform it into a stream-data structure.

- Marcus

neerajthakur
Creator III
Creator III
Author

That Sum was in error I removed it and used rangesum it works fine, Thanks man.

Thanks & Regards,
Please Accepts as Solution if it solves your query.