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
djh
Frequent Visitor

Filter table date

Hi,

 

i'm wanting to create some measures to work out customer retention. I want to look at data within certain date ranges, and apply a measure to my table, but only using the most recent month of data.

 

Everything i do says that a selection was used when a single value was expected.

 

 

Any suggestions? I tried to do lastdate less 30 days as a filter in a calculate statement.

1 REPLY 1
Anonymous
Not applicable

Hi @djh 

 

Could you please post some sample data with expected output? That will help us to help you.

 

By going through your post, am guessing that you want to create a measure for last month data. So, for example, you want to create sum of sales for the last month data, then the below one will help you.

 

CALCULATE(SUM(Sales_Fact.Sales),DATEADD(Dates[Date],-1,MONTH)

 

Hope this helps. Please share more details, if you need further info.

 

Thanks
Raj

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.