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
ola1996
Helper I
Helper I

DAX formulas

Hello, 

I'm new in DAX and I need some help. I try to create new measure to calculate the amount for my accounts. But the problem is that I have amount from each account by months. Like in the table below.

 

And I want to see amount from January in April, from February in May, from March in June, from April in July, from May in August, from June in September and so on.

 

My question is, how can I do it by DAX formulas?

 

 

8 REPLIES 8
Anonymous
Not applicable

This is very easy on condition that you've got the correct model.

[Balance -3Mth] =
	CALCULATE(
		[Balance],
		DATEADD(
			Calendar[Date],
			-3,
			month
		)
	)


Best

D

Can you tell me how to create this formula if I want to add vaules from January to March and show it as a sum of March and January and with next months the same situation ? 

@Anonymous  I base on three tables and four columns. 

date: Posting_Date (hierarchy: day, month, year) from "General Ledger Entries" table

values: Amount (as a sume) from "General Ledger Entries" table

and accounts from "dictionary VAT' table

 

olakrupa_0-1594118065603.png

I was trying to change your formula for my needs like that 

 

 

 

 

CALCULATE( 'General Ledger Entries'[Amount]; 
		DATEADD(
			'General Ledger Entries'[Posting_Date].[Miesiąc],
			-3,
			month
		)
	)

 

 

but still doesn't working 

amitchandak
Super User
Super User

@ola1996 , Image is not visible

Can you share sample data and sample output.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak Sorry, I did't see my mistake 

Here are base table 

months.png

That should be the outputs

months2.jpg

@ola1996 , can not tell mistake with image, need sample data

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I thing it's impossible because these are data directly from Dynamics 365 BC. 

nandukrishnavs
Community Champion
Community Champion

@ola1996  Can you provide the sample table (not image) and expected output?


Regards,
Nandu Krishna

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.