Forum Discussion
Conceptual DAX Question
Good Morning,
I have several columns I need to calculate "average" on. Conceptually, can i write 1 DAX measure for all the different columns I will need to have an average for? Another way of stating it, is their any way I can drag & drop the columns into a pivot table and have the 1 DAX measure work for all the columns? Or am I forced to write a seperate DAX measure for each column?
Thank you,
James
Jkaelin define dynamic measures? i mean the syntax would be in dax
measure= averagex(table,tablecolumn + table,tablecolumn. etc..
not sure how dax know what to combine if you dont declare it?
3 Replies
- vanessafvgCommunity Champion
i haven't tested it but i think you could probably use list.average in power query
ie.
https://msdn.microsoft.com/en-us/library/mt253588.aspx
- JkaelinResolver I
I assume DAX isn't build to do dynamic measures?
I could take the route of list.average; but I was using average as a simple example of something more complex I was inquiring about. Ultimately, I'm wanting to crunch averages, counts, stdev, etc on several columns of data and therefore was hoping to avoid writing multiple DAX measures per column.
Do you know if that is probably what I'm ultimately going to have to do?
Kindly,
James
- vanessafvgCommunity Champion
Jkaelin define dynamic measures? i mean the syntax would be in dax
measure= averagex(table,tablecolumn + table,tablecolumn. etc..
not sure how dax know what to combine if you dont declare it?