cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
louie_c
Regular Visitor

DAX ON QUARTERLY USING DIM DATE APPROACH

louie_c_0-1646124602545.png

 

 

For those using this approach on measures asking for help. For me to get the Quarterly figure i use the below script i.e. sum of months for month -3.

 

. The challenge is when quarter is not yet complete like Q1 2022, im getting Jan'22, Dec'21, Nov'21 instead of Jan'22 only.

 
Gross Collections This Quarter (USD) =
CALCULATE (
SUM ( Monthly_Performance[Gross Collections (USD)] ),
FILTER (
ALL ( Monthly_Performance[Month] ),
Monthly_Performance[Month] <= MAX ( _DimDate[Date] )
&& Monthly_Performance[Month]>= EDATE ( MAX( _DimDate[Date]), -3 )
)
)
2 REPLIES 2
amitchandak
Super User
Super User

@louie_c , Try Time intelligence functions

 

QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])))
Last QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,QUARTER)))

 

Power BI — Qtr on Qtr with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839
https://www.youtube.com/watch?v=8-TlVx7P0A0

Thanks. Will it work on filters?

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors