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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors