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

Get values from last month

I have a excel document which contains the following data:

dandan123456_0-1662626389550.png

 

 

Is it possible to create a DAX query that will show me the data from last month e.g:

Dummy4, Dummy5? 

1 ACCEPTED SOLUTION

Hi @Anonymous,

In fact, measure expressions are calculated based on filter and row contexts.

Row Context and Filter Context in DAX - SQLBI
If you do not want to apply any filter to your visual, it means you need to manually add particular filter expressions to all of the formulas which need to achieve this effect.
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , Assume you have date, Create a measure and use that in visual or visual level filter

 

measure =

var _max=  maxx(allselected(Table), Table[date])

return

calculate(countrows(Table), filter(Table, eomonth(Table[Date],0) = eomonth(_max,0) ) )

Anonymous
Not applicable

Hi @amitchandak Thank you for your response. I was hoping to wrap it into one instead of using it as a filter. Is there a way to get the measure to return all the results required without the need of using it as filter?

Hi @Anonymous,

In fact, measure expressions are calculated based on filter and row contexts.

Row Context and Filter Context in DAX - SQLBI
If you do not want to apply any filter to your visual, it means you need to manually add particular filter expressions to all of the formulas which need to achieve this effect.
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.