Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Jkaelin
Resolver I
Resolver I

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

1 ACCEPTED SOLUTION

@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?   

 

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
vanessafvg
Super User
Super User

@Jkaelin

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

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




@vanessafvg

 

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

@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?   

 

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.