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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Row context

I made the following measure:

AVG last 12 Actual months =
VAR End_date = DATE ( YEAR(MAX('End of Month Table'[End of month])) , MONTH (MAX('End of Month Table'[End of month]) )-1 , DAY ( MAX( 'End of Month Table'[End of month])))
VAR Begin_date = DATE ( YEAR(MAX('End of Month Table'[End of month])) , MONTH (MAX('End of Month Table'[End of month]) )-13 , DAY ( MAX( 'End of Month Table'[End of month])))
RETURN
CALCULATE([SumAmount 1000s] ,
'Date','Date'[Date] <= End_date && 'Date'[Date] > Begin_date 
)
End of Month Table is used to select the starting point for the table visual.
The table visual I need the above measure to work in, also has a date field. So e.g. for 31st of March 2021 I want the above measure to show the value for the above 12 months. Instead I get the value just for the date in the table visual (which is blank since there is no actuals for 31st of March 2021. 
I need to ignore the data row context. How to do it? 
 
 
 
 
2 REPLIES 2
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

If you want to ignore the oringinal context, you could use ALL() funtion.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
amitchandak
Super User
Super User

Not sure I got it completely

But this formula should be something like this

CALCULATE([SumAmount 1000s] ,all('Date'[Date]),'Date'[Date] <= End_date && 'Date'[Date] > Begin_date )

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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