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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to fix bug in dax function (from date - to date slicer)

hey everyone, 

I'm desperate to fix this problem below. I will share dax and screenshots as well. 
It's working for 2024,25,26,27 but it's not working 2022 and 2023... interestingly It's actually filtering the selected dates when I remove dimensions from "Rows" I have no idea how this is happening, and If it's easy I want to fix my dax code, if not other approaches will be appreciated.

this is the dax function I use in the matrix view, filtered by "1"

Bilhan_0-1695743547179.png


NUMBER #1
and this filters the records between selected dates, from date - to date, here below 
(bring from 2022 - Q2 to 2023 - Q2) but we don't have any dimensions in the Rows

Bilhan_1-1695743602905.png

NUMBER #2 
it works after 2023 but when it comes to 2022 and 2023 it's NOT working

Bilhan_2-1695743759584.png

 

when I remove "Rows" it's working

Bilhan_3-1695743798662.png

NUMBER #3 
It's not even working in 2022 (when remove "rows" its working)

Bilhan_4-1695743840811.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

it was filterin on table view, but i realized it was not working for MATRIX view, and i remember to not 
using a filter in the table but in the measures itself. I adjusted 2 measure i used to this below. Now it's working 

Bilhan_0-1695908901632.pngBilhan_1-1695908910550.png

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

it was filterin on table view, but i realized it was not working for MATRIX view, and i remember to not 
using a filter in the table but in the measures itself. I adjusted 2 measure i used to this below. Now it's working 

Bilhan_0-1695908901632.pngBilhan_1-1695908910550.png

 

 

amitchandak
Super User
Super User

@Anonymous , if you want two date/period slicer you need to follow disconneted table approch

 

Power BI Abstract Thesis: How to use two Date/Period slicers

https://youtu.be/WSeZr_-MiTg

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Kudoed Authors