The chart shows what I want to achieve: I want a bar chart with first the average of all users and next to it the values of the current user. In google charts that is not too difficult, but how can I use =averageif(A:A,E2,C:C) in wpdatatables?
And how can I use =vlookup(E2,(filter(A:C,B:B=%currentuser%)),3) or something alike to filter the data for the current user only. Actually, the google chart combines two series. How could this work in wpdatatables?
Hi, I added a couple of custom number fields to the users. Now I want to make a chart with the average values of each of these fields.
When I generate a query to the wordpress database I can select only post types, but not the user data fields.
How can I proceed?
Hi, I am a little bit further now. I made a table using this query:
SELECT wphy_usermeta.user_id,
wphy_usermeta.meta_key,
wphy_usermeta.meta_value
FROM wphy_usermeta
WHERE 1=1
AND wphy_usermeta.meta_key IN ('vakx','vaky','vakz')
That results in a table which contains all the data I need. In this link you can see the data in columns A:C
https://docs.google.com/spreadsheets/d/1SB5I7z8zIdEFXAQt8BDi6tcN-t1LOsKPkJ6b5CQSBgY/edit?usp=sharing
The chart shows what I want to achieve: I want a bar chart with first the average of all users and next to it the values of the current user. In google charts that is not too difficult, but how can I use =averageif(A:A,E2,C:C) in wpdatatables?
And how can I use =vlookup(E2,(filter(A:C,B:B=%currentuser%)),3) or something alike to filter the data for the current user only. Actually, the google chart combines two series. How could this work in wpdatatables?
Thanks if you can help me any further!
Hi Tony66,
Unfortunately there is no such a option for using that functions in our plugin. You can try with Formula (calculated) columns.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables