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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
ShaneOC12
New Member

PBI Measure Issue

Hi,

I have an issue where I'm calculating the Overall Average Monthly Sales, which at the moment is 337 and the total returns (RGA's) per month which varies month to month. I then divide the Total RGA's by the Average Monthly Sales to get the RGA % per month. The problem I'm having is when I put this measure in as a line y-axis in my bar chart, the Average Monthly Sales is calculated for every individual month, so it basically just give me the total sales for each month where I want it to just stay as the Overall Average Monthly Sales (337 sales per month). I would just divide total RGA's by 337 but this number could change daily so I want it calculated using a measure. Ill include the measures I'm using below along with some photos of the graphs.

ShaneOC12_0-1724849489425.png

ShaneOC12_0-1724849574456.png

 

 

Total RGA's = COUNT('RGA: Evaluation'[RGA No])
------------------------------------------------------------------------------------------------
Overall Average Monthly Sales = 
AVERAGEX(
    KEEPFILTERS(VALUES('RGA: Date table'[Month Year])),
    CALCULATE(SUM('RGA: US Sales Data'[Quantity]))
)
------------------------------------------------------------------------------------------------
RGA% = 
   DIVIDE([Total RGA's], [Average Quantity Per Month])

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ShaneOC12 

 

Please try to use the following DAX to create a measure to represent "Overall Average Monthly Sales", I hope it works.

Overall Average Monthly Sales = 
CALCULATE(
    AVERAGEX(
        VALUES('RGA: Date table'[Month Year]),
        CALCULATE(SUM('RGA: US Sales Data'[Quantity]))
    ),
    REMOVEFILTERS('RGA: Date table'[Month Year])
)

 

Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

I cannot understand your desired result.  Share some data to work with and show the expected result.  Share data in a format that can be pasted in an MS Excel file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @ShaneOC12 

 

Please try to use the following DAX to create a measure to represent "Overall Average Monthly Sales", I hope it works.

Overall Average Monthly Sales = 
CALCULATE(
    AVERAGEX(
        VALUES('RGA: Date table'[Month Year]),
        CALCULATE(SUM('RGA: US Sales Data'[Quantity]))
    ),
    REMOVEFILTERS('RGA: Date table'[Month Year])
)

 

Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.