cancel
Showing results for 
Search instead for 
Did you mean: 
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 Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors
Top Kudoed Authors