SOLVED
Gini Calculation Module
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
j_brzezinski
8 - Asteroid
‎07-25-2015
06:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
A Gini index provides a measure of diversity for a particular continuous or catagorical variable. It is usually used to measure concentration of wealth or income. There are some versions that provide an index of diversity, such as concentrations of species. Is there a sample module or macro to do the calculations in Alteryx?
Solved! Go to Solution.
Labels:
- Labels:
- Expression
- Preparation
1 REPLY 1
kane_glendenning
10 - Fireball
‎08-03-2015
01:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Joseph,
I haven't seen any samples with this and if one was to be built, then I probably wouldn't leave the inefficient join as below, but this is a quick solution.
Based on the formula for Gini Co-efficient from Wolfram:
The below set of tools will produce the Gini co-efficient:

Configurations as follows:
Join: On the field created in the preceding formula tool to get all possible combinations
Summarise: 3 Outputs:
Kane
I haven't seen any samples with this and if one was to be built, then I probably wouldn't leave the inefficient join as below, but this is a quick solution.
Based on the formula for Gini Co-efficient from Wolfram:
![]() |
The below set of tools will produce the Gini co-efficient:

Configurations as follows:
Join: On the field created in the preceding formula tool to get all possible combinations
Summarise: 3 Outputs:
- Sum_Difference (Numerator of the equation)
- Avg_Salary (mu, this should be the average of the variable of interest)
- Max_RecordID (n, the number of observations)
Kane
