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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
thetenz
Frequent Visitor

Dax Mesure that calculates monthly total

Suppose I have the revenu table below:

Business Unit Date BudgetRevenueCumulative revenue     
NAJan-23 100015001500    
Asia Jan 200010501050    
Africa Jan 300020002000    
AustraliaJan 400040504050    
NAFeb 100050006500    
Asia Feb 200012502300    
Africa Feb 300020004000    
AustraliaFeb 400030507100    
NAMarch 100010506050    
Asia March 200030404290    
Africa March 300025004500    
AustraliaMarch 40003600039050    
          
          

 

What Dax mesure should I be using  that will give me monthly revenue total and previous months cumulative. Example: Monthly revenu for January is $10,000 . What measure will automatically that for the current month/previous month. 

Thank You!

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

Ensure that the entries in the Date column are of the Date data type.  Create a Calendaer Table with calculated column formulas for Year, Month name and Month number.  Sort the Month name by the Month number.  Create a relationship (Many to One and Single) from the Date column of the Data Table to the Date coluimn of the calendar Table.  To our matrix visual, drag Year and Month name from the Calendar Table.  Write these measures

Total = sum(Data[Budget])

Total in PM = calculate([Total],previousmonth(Calendar[Date]))

Hope this helps.


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

Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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