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
webenton
New Member

Monthly Average Line on Daily Bar/Line Chart

I am trying to do something that I hope will be simple, but I just don't underestand enough about DAX yet to figure out how to make it happen.  Here is the senario...

 

We ship product 7 days per week.  I have a table that tells every shipment line for each day called Shipments.  We measure our shipments by business days, not the actual shipment dates.  I have a calendar table called Calendar that references each date to a SaleDate, a FiscalMonth, and a MonthlyDenominator that represents the business days in that month.  I produce a bar chart that shows the volume shipped per day that is color coded by FiscalMonth.  This all works perfectly.

 

My challenge is adding a line to the chart that represents the average sales per day for each fiscal month.  I created a measure that gives me the answer that I need in a visual grouped by FiscalMonth.  

 

Measure: MonthLine = SUM('Shipments'[Volume]) / AVERAGE('Calendar'[MonthlyDenominator])  

 

When I add this to a visual that is grouped by SaleDate instead of FiscalMonth the line is drawn as the as the daily sum of volume divided by the denominator, rather than the sum of volume from that month divided by the denominator.

 

To try and fix this problem I created another source table that is just the list of FiscalMonths which I related to the Calendar table.  I then added the Measure to that table in hopes that it would by default always be grouped at the month level.  But no such luck.  

 

So I am stuck trying to figure out how to reference some data grouped by Date while other data is grouped by Month on the same chart.  Help!

 

Bill

0 REPLIES 0

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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