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, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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