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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Abdullah-Ultra
Frequent Visitor

How to filter year and month by slicer on "Created Date On" from 4 different data sets.

I have 4 different data set and every data set have "Created Date On"

 

Have to create 4 bar charts one from every data set.

 

How to create 2 slicers one to filter by Years and one for by months on based of "Created Date On"  ??

 

Thanks in advance 🙂 

 

AbdullahUltra_0-1699885269453.png

 

11 REPLIES 11
Anand24
Super User
Super User

@Abdullah-Ultra ,
Is the issue resolved? If not, can you make sure all date fields are of Date datatype and not Date/Time.

If still not resolved, please try to attach the report after removing sensitive data so that we can solve and give back the solution pbix.

PBI_SuperUser_Rank@1x.png  

Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

Proud To Be a Super User !!!
LinkedIn

Here is the link of the file with very few data but might work to provide solution.

 

Thank you so much 🙂 

 

https://nuclearsystems-my.sharepoint.com/:u:/g/personal/abdullah_jamil_ncs_group/Edy8j5bhLqZEkGarW2W... 

AmiraBedh
Most Valuable Professional
Most Valuable Professional

It is simple you need to create a calendar table :

 = CALENDAR(DATE(2010,01,01), DATE(2021,12,31))

You need to check the intervals, it returns a single column table with datetime values from the start date to the end date.

AmiraBedh_0-1699886568426.png

Link the calendar table to your existing tables. A hierarchy will be created and you can choose the year and the month in filters.

 

 


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696
Anand24
Super User
Super User

Hi @Abdullah-Ultra ,
Create a date dimension table using CALENDAR or CALENDARAUTO and create 4 relationships from this table's date with all 4 "Created Date On" with uni-directional filtering (arrow from Date Table's date towards the 4 "create date on").

 

In the Year and Month slicers, take the Year and Month from the new date.

PBI_SuperUser_Rank@1x.png  

Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

Proud To Be a Super User !!!
LinkedIn

I did the same but when I use slicer filters I did'nt bring any filtered data 😞 

 

AbdullahUltra_0-1699888316676.png

 

AbdullahUltra_2-1699888514567.png

 

 

AbdullahUltra_1-1699888408722.png

 

AmiraBedh
Most Valuable Professional
Most Valuable Professional

Can you share your pbix file ? what is the type of Created Date On initially ?


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Here is the table information.

 

Let me know if I created wrong date table

 

AbdullahUltra_0-1699889373741.png

 

AmiraBedh
Most Valuable Professional
Most Valuable Professional

Not in the calendar in the other tables ?


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Here you go

 

same in all other data set aswell, data type is date but for your information there is time information in it as well if I change data type from date to date and time so it will show if that might creating any issue as my calander table time is 000000 in against every date.

 

AbdullahUltra_0-1699954557665.png

 

AmiraBedh
Most Valuable Professional
Most Valuable Professional

Can you please share your pbix file ?


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Here is the link of the file with very few data but might work to provide solution.

 

Thank you so much 🙂 

 

https://nuclearsystems-my.sharepoint.com/:u:/g/personal/abdullah_jamil_ncs_group/Edy8j5bhLqZEkGarW2W... 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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