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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors