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: 
Evan0211
Creator II
Creator II

Group By and Sum in a KPI

I have a strange issue. I have a table that contains information like this...

Record ID Amount OutLink
123 333 abc
123 333 zzz
456 500 tre

 

I have done a group by in the data load to Sum(Amount) as "Sum Amount" and did a Group By Record ID.

In a KPI, if put in [Sum Amount] it is null on the initial load, but when I click on a record in the table, it shows the correct amount in the KPI. If I change the KPI to Sum([Sum Amount]) it loads initially, but the value is off. For the example above, it would show 1,166 (it basically ignores my group by). Any ideas?

Labels (3)
1 Solution

Accepted Solutions
anat
Master
Master

We should have some functions in the kpi or else values will be displayed once any selection. You can try like below

only([Sum Amount]) 

View solution in original post

5 Replies
hanna_choi
Partner - Creator
Partner - Creator

Hello

Do you want to output like below?

hanna_choi_0-1724373659182.png

I created a summary table, and connected the summary table and the source table with the record_ID field.

hanna_choi_1-1724373872926.png

 

I hope it helps.

 

Best Regards.

hanna.choi

anat
Master
Master

We should have some functions in the kpi or else values will be displayed once any selection. You can try like below

only([Sum Amount]) 

Evan0211
Creator II
Creator II
Author

Thanks, but I am looking for 833 not 1,166. The 333 should not be double counted. 

Evan0211
Creator II
Creator II
Author

Only() does not show the total onLoad, it shows the correct grouped by sum when an element is selected in the table. I need a sum of the grouped by totals on the initial load and then when you filter down, the KPI filters with it.

 

Edit: I think this actually does work, I just had the Only() on the KPI instead of in the data load.

 Thank you so much!

Evan0211_0-1724417713147.png

 

tresesco
MVP
MVP

@Evan0211 , so you don't want aggregation of repetitive amounts ? If so, you can try like :

Sum(Distinct Amount) as [Sum Amount]