cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Bilhan
Resolver I
Resolver I

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
Bilhan
Resolver I
Resolver I

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
Bilhan
Resolver I
Resolver I

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

@Bilhan , 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

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors