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

Ignore all filters in measure (excluding selected date range)

Hi,

I've searched everywhere for a solution to this but not having any luck.

I'm trying to write a calculate formula to create a kind of 'Grand Total' on every row for a given date range (ignoring all other filter context).

Effectively, something that says:

 

 

Grand Total Orders for Selected Date Range = Calculate(PerformanceTable[Total Orders],ALL(PerformanceTable),***FILTERED BY SELECTED DATE RANGE***)

 

 



Please can you help me with this?

Many thanks!


Dom
 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous ,

Try like

Grand Total Orders for Selected Date Range = 
var _max = maxx(allselected(Date),Date[Date])
var _min = minx(allselected(Date),Date[Date])
return 
Calculate(PerformanceTable[Total Orders],filter(ALL(PerformanceTable),PerformanceTable[Date]>=_min && PerformanceTable[Date]<=_max))

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous ,

Try like

Grand Total Orders for Selected Date Range = 
var _max = maxx(allselected(Date),Date[Date])
var _min = minx(allselected(Date),Date[Date])
return 
Calculate(PerformanceTable[Total Orders],filter(ALL(PerformanceTable),PerformanceTable[Date]>=_min && PerformanceTable[Date]<=_max))
EricHulshof
Solution Sage
Solution Sage

You can use SELECTEDVALUE to get the value from your dateslicer and use it in a FILTER expression. 


Quality over Quantity


Did I answer your question? Mark my post as a solution!


Anonymous
Not applicable

Hi @EricHulshof ,

Please can you expand on how I would do this?  Sorry, I'm fairly new to Power BI.  🙂

@Anonymous 

If you could share a sample dataset of your report i could write the measure for you and explain how it works 🙂


Quality over Quantity


Did I answer your question? Mark my post as a solution!


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.