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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Anonymous
Not applicable

DAX formula Help averages

Hi All,

I am quite new to Power Bi and don't have any previous experience with DAX formulas so I am hoping someone can help me.

I am trying to build a Line and Clustered Column Chart where the column chart is displaying sales of pre-defined "target accounts". On the line value I am trying to display an average of sales of "all accounts' at product level rather than average sales at account level. I believe this can be done through DAX but not sure how to proceed.

I hope i have explained this clearly and someone has advice on this topic? 

 
 
3 REPLIES 3
v-shex-msft
Community Support
Community Support

HI @Anonymous,

How may fields are you used on the shared axis fields? Please add them(except your account field) to below formula and package with values function, link with 'delimiter' to replace 'values(sheet1[Shared axis])' part:

Measure =
CALCULATE (
    AVERAGE ( Sheet1[Sales Amount USD BR] ),
    ALLSELECTED ( Sheet1 ),
    VALUES ( Sheet1[Shareed axis] ),
    VALUES ( Sheet1[TPG] )
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
v-shex-msft
Community Support
Community Support

HI @Anonymous,

How your chart designed? Since we not so clear for your data structures, can you please share more details information to help us clarify your scenario?

How to Get Your Question Answered Quickly 

In addition, you can also try to use the following measure formula if it meets for your requirements. (it summary current filter table records and group by columns series)

AVG =
CALCULATE (
    AVERAGE ( Table[Amount] ),
    ALLSELECTED ( Table ),
    VALUES ( Table[ColumnSeries] )
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

Can you share sample data and sample output. On excel, if needed

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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