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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
ns4321
Frequent Visitor

Create a filtered DAX table based on date slicer

Hi,

 

I am trying to create a DAX that gives a filtered table based on date range selected in the slicer. 

 

 

 

Filtered_Table = 

var minDR = min('Calendar'[Date])
var maxDR = max('Calendar'[Date])

return Filter(Sales,DATESBETWEEN(Sales[Date],minDR,maxDR)

 

 


But I am getting this error:

ns4321_0-1672872317949.png

 

The PBIX I used is the Microsfot's sample: https://github.com/microsoft/powerbi-desktop-samples/blob/main/Sample%20Reports/Sales%20%26%20Return...

What am I doing wrong? My intention is to create filtered table, then summarize it and create additional DAX measures. But getting lost at this step. 

 

Appreciate if anyone can help. 

 

Thanks

 



2 REPLIES 2
ns4321
Frequent Visitor

Thanks @Ashish_Mathur . But I need to do many additional steps on this filtered table - summarize, find top N, pull non Top N as "others", etc. So I want to be able to do this in a DAX. 

Ashish_Mathur
Super User
Super User

Hi,

Why do you want to create a filterd table?  Just drag Date from the Calendar Table and select any date range.  Then write this measure

Total = sum(Data[Sales])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors