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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Porntas
New Member

How to calculate average line in DAX which for SPC

I want to calculate linear average line for Line graph (Average line of below picture is from fucntion)

Porntas_0-1674628320180.png

I try to use DAX as CALCULATE(AVERAGEX(),ALLSELECTED()) but it not work I found problems

1. I linked Month Master[Month Name] With Test[Month] but the data is not show due to X-axis don't change as filter (From Month Master). But if I use Test[Month] as filter, it's my expectation. 

 

2. I want X-axis are BATCH ID but can filter by Month

 

3. It's will be a slot on line graph if there are blank cell in my query.

 

Please help me, I try for many days to solve

 

I've uploaded my file as below link
https://drive.google.com/file/d/1JL6Hyt3z3wtDqA1bmOLjWAn1IMN8-paR/view?usp=sharing

 

 

0 REPLIES 0

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.