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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors