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
Anonymous
Not applicable

Need to calculate prior 3 months based on selected month

Hello all,

 

I am trying to calculate sum of a measure for last 3 months based on the selected month. I do not have a date table and I am importing the data from SSAS server. Its an import and not a live connection.

I only have a month and year fields for the time. I do not have a date.

 

Can someone please help?

 

Thanks,

Lakshay

3 REPLIES 3
VCQ
Frequent Visitor

You should make a standard date table! It reelly helps.  Then you can calculate(measure, datesbetween) 

 

https://msdn.microsoft.com/en-us/query-bi/dax/datesbetween-function-dax

Anonymous
Not applicable

I do not want to get date in the query result set when I import the data. The result set is very huge and will take much longer if I get the date as well. Appreciate if you have another suggestion...

VCQ
Frequent Visitor

In your import query combine the month and date and add first of month. Replace Jan with 1...etc and combine all the colu mns by adding a new column. Change the data format to date. Enjoy dax date functions.

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.