- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sum by $field
Hello Everyone -
Trying to create a dynamic field overview where you can click around, but am having difficultly using sum($field).
Everything is showing up as 0. Does anyone have a suggestion?
Thanks.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try Sum($(=$Field)). You will still get 0 if it is a text field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
can you add more info? like how you want it to be dynamic ? what type of objets you will use ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try Sum($(=$Field)). You will still get 0 if it is a text field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Youssef,
Essentially, I am looking to profile the data using the system field $field.
For example:
I have 3 fields in the dashboard -
Amount
Customer Name
Customer Number
I would like to profile these fields by looking at the min value, max value, isnull, distinct values, and sum of values.
The all other aggregate functions are working properly, except for SUM. No matter what I try to do, set analysis, standard syntax, the value ends up being zero.
Example code:
=sum($field)
=sum({1}$field)
Let me know if you need any additional detail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Believe this is fine to reply as much
1) First of All do you know how $field returns?
2) Even if you have 3 fields it returns all together that means sum never work
3) Can you share your experience what you've done which is working under neath?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
$Field is a system field contains the name of the fields present in the dashboard.
Try below expression
=sum($(=MaxString($Field))) it is just getting the max field name present in the $Field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could just create a table with $Table and $Field as dimensions and then you could use the approach from Jerry but you need to add square-brackets to ensure that it also worked by fields with spaces or any kind of special chars:
count([$(=$Field)])
- Marcus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Everyone,
Thank you for the quick replies! Jerry's response worked correctly.