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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
wquayle
Frequent Visitor

Previous Month Volume

I created a date table and the two formulas below to calculate total volume from the prior month across 4 categories, but when I apply the formula the resulting tables show total volume by each month, not solely the prior month (May). My end goal is to create a line and cluster bar chart where the bars are the prior month volume and the line is the average monthly volume. Appreciate any thoughts or help on what I’m doing wrong. 

 

Date table:

Date =

VAR __dates = CALENDARAUTO()

RETURN

ADDCOLUMNS (

    __dates,

    "Year", YEAR ( [Date] ),

 "Month Number", MONTH ( [Date] ),

 "Month Name", FORMAT ( [Date], "MMMM" ), --use MMMM for full month name, January instead of Jan

    "Month", FORMAT( [Date], "MMM, YYYY" ), --use MMMMM for full month name, January instead of Ja

 "Month Sort", FORMAT( [Date], "YYYY-MM" ),

 "Quarter", "Q" & FORMAT( [Date], "Q, YYYY" ),

 "Quarter Sort", FORMAT ( [Date], "YYYY-Q" ))

 

Formula to calculate total volume across all my data categories:

Total Volume = Calculate(Sum('2020 Monthly Production Volume'[Value]))

 

Formula to calculate total volume across all my data categories:

Sum Prior Month = CALCULATE ([Total Volume], PREVIOUSMONTH('Date'[Date]) )

0 REPLIES 0

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors