cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
giraffesrock
Helper I
Helper I

Indices in DAX

Hi,

 

So I thought this would be simple but its not appearing to be so.

 

I just need to iterate through a column and take the value1 and compare that to the average for the whole table for that value * 100

 

Its quite a normal marketing practice so I hope its possible to find an answer 🙂

 

Please help if you can.  🙂

1 ACCEPTED SOLUTION
mahoneypat
Super User IV
Super User IV

Here is a column expression to do that:

 

Avg Column = 'Table'[Value]/AVERAGE('Table'[Value])*100
 
And here is a measure expression that does it (to be used in a table visual that has the Value column in it:
 
Avg Measure = SELECTEDVALUE('Table'[Value])/CALCULATE(AVERAGE('Table'[Value]), All('Table'))*100
 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

1 REPLY 1
mahoneypat
Super User IV
Super User IV

Here is a column expression to do that:

 

Avg Column = 'Table'[Value]/AVERAGE('Table'[Value])*100
 
And here is a measure expression that does it (to be used in a table visual that has the Value column in it:
 
Avg Measure = SELECTEDVALUE('Table'[Value])/CALCULATE(AVERAGE('Table'[Value]), All('Table'))*100
 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.