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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
arane
Frequent Visitor

Date picker not filtering tables

The date picker is created on page using
calendar = CALENDAR(Date (2000,1,1), DATE(2040,12,31))
The slicer setting for date picker kept as Between

The 2 queries are added to create grid report and joined date from calendar table with these 2 queries
in order to filter date. the relation is active and one to many.

arane_0-1727257450950.png

 

Issues:

The filter is working for one report and not for another.
Also the value getting shown in calendar on first go should be passed to reports which is not happening.

 

Also, want to know how ro debug the table on the page created using power Bi Desktop.

 

1 ACCEPTED SOLUTION

Hi @arane ,

You can combine the date columns from all the tables into one column and then use this column to filter those tables.
 
In my test, there are two tables and they both have a date column.
The date column is not quite the same for the time portion of each row.
vdengllimsft_0-1728263925131.png
vdengllimsft_1-1728263925131.png

 

Select the date column of a table, and then select Append Query as New.
vdengllimsft_2-1728263935869.png

 



Append the two tables into a new table and then delete the columns other than the date column. And de-duplicate the date column.
vdengllimsft_3-1728263935871.png
This allows you to filter the original table by the date column in that new table.
vdengllimsft_4-1728263943498.png

 



Please see the attached pbix for reference.

Best Regards,
Dengliang Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
arane
Frequent Visitor

Hi Philip

Thanks for the reply.

I am not sure even the filter is working or not.

for range of Year 2000-2038 it showed 2 records

kindly refer below screenshot

arane_0-1727347287327.png

 

when erased filter and it set up with default values i.e. for year 2000-2040 it showed multiple records for 2024

arane_1-1727347392613.png

soon i will build a report based on sample excel to share so that you can check at your end.

 

Regards,

Ashwini

 

 

Hi @arane 

 

You said 'for range of Year 2000-2038 it showed 2 records' - is that not what you expect?

 

You said 'it showed multiple records for 2024' again is this not hat you expect?  If there are multiple records for 2024 then they shoudl al be shown if you include 2024 in your filter.

 

Please provide data and explain why you think the results as you've shown so far are wrong, and what you expect as a result.

 

regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hi Philip

 

I meant if there is data for year 2024 then that should be picked up when date picker has 2000-2038 set.

I have created this sample data and its not working here as well

arane_0-1727428116167.png

arane_1-1727428245080.png

 

CountryDate
England

7/12/2024 19:00

France7/12/2023 19:00
Italy7/12/2022 19:00
England7/12/2021 19:00
France7/12/2020 19:00
Italy7/12/2019 19:00
  

 

Can you check at your end?

Regards,

Ashwini

Thanks for @PhilipTreacy 's reply.
Hi @arane ,

The time in each row of the calendar table is 12:00:00AM, while the time in each row of the date column in your sample data is 7:00:00PM.

This results in the date column in the calendar table unable to filter the example data.

 

You can create a date table with the following DAX, where each row of the date column has a time of 7:00:00PM, so that the date column of the date table can filter the example data.

Calendar = 
VAR _calendar = CALENDAR(DATE(2000,1,1),DATE(2040,12,31))
RETURN
SELECTCOLUMNS(_calendar,"Date",[Date]+TIME(19,0,0))

vdengllimsft_0-1727680687931.pngvdengllimsft_1-1727680796952.png


Please see the attached pbix for reference.


Best Regards,
Dengliang Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

@v-denglli-msftThanks for your comment and suggestion.

 

I modified the excel sheet data and changed time to 07:00:00 PM and same in calendar query.

and it worked.

But with actual data the time could vary for each records. And this calendar picker is common for multiple queries added on page. It should work with all.

In that case i also tried to add a column where its only date and even calendar query with only date.

Why that didn't work? any idea?

 

Regards,

Ashwini

Hi @arane ,

You can combine the date columns from all the tables into one column and then use this column to filter those tables.
 
In my test, there are two tables and they both have a date column.
The date column is not quite the same for the time portion of each row.
vdengllimsft_0-1728263925131.png
vdengllimsft_1-1728263925131.png

 

Select the date column of a table, and then select Append Query as New.
vdengllimsft_2-1728263935869.png

 



Append the two tables into a new table and then delete the columns other than the date column. And de-duplicate the date column.
vdengllimsft_3-1728263935871.png
This allows you to filter the original table by the date column in that new table.
vdengllimsft_4-1728263943498.png

 



Please see the attached pbix for reference.

Best Regards,
Dengliang Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-denglli-msft 

 

Currently, there are 6 views which are getting used on the page that is getting designed to fetch records. Can we append all 6 queries?

The other option i found is, since i have Direct query to database tables and not import; i have added another field in views which contains only date (here changing datatype in powerbi visual dint work since its Direct query). and then filtered the field with Calendar query. and it worked.

 

The option you provided seems useful in case if it works on 2 queries to append. I will use it for another page which will have less numbers of queries.

 

The information you provided and efforts you put is precious and mind blowing. Thank you so much!

 

Thanks and Regards,

Ashwini

PhilipTreacy
Super User
Super User

@arane 

 

If everything is as you describe then it should work so there must be something else.

 

But I'd need your PBIX file to see what that is - can you provide it?

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.