Forum Discussion
Anonymous
5 years agoNot applicable
Basic stats for a given field
If accessing a database directly, as opposed to via powerbI, I could find info about a given field by running a bit of SQL - for instance: SELECT AVG(field_name) AS averageVal FROM tableName ...
- 5 years ago
Hi Anonymous ,
Modify your measure as below:
Measure = AVERAGEX(ALL('Table'),VALUE('Table'[values]))And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
amitchandak
Super User
5 years agoAnonymous , Create a measure and you can use it
measure = AVG(Table[field_name])
- Anonymous5 years agoNot applicable
Thanks!
I had tried that, but received the error that average could not operate on string values.
All of the values in the column are numeric - but it may be that they are stored in the database as numeric striungs rathert than as integers. Not sure if there is a way I can cast them to ints....
I tried adding a measure that called VALUE() on each numeric field - but there seems to be some kind of syntax issue
It seems I can't add a calculated colum to the data, since it is live streamed from a remote databaseReregarding the conditional cloauses - so the equiavalent of:Measure = AVERAGE(events[param1]) where date range is X for instanceIt looks like I have to enable the time field, then add the filter, then disable the field again? That seems clunky, though it does work, so not sure if there is a neater way!