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



Learn Power BI - Full Course with Dec-2022, with new DAX functions like Window, Index, Offset !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Formatted Profit and Loss Statement with empty lines

Thanks. Will it work on filters?

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.

Top Solution Authors
Top Kudoed Authors