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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
LucasCamargo
Helper I
Helper I

How to set my Slicer Date with only existing date

Hello!

 

I created a table using CalendarAuto, so, when I create a Slicer to see the date, it shows me all Years/months/days available.

 

How do I set my Slicer Date with only Years/Months/Days that existis in my personal Dataset?

 

Ps: I already tried put the date column that I have in my personal dataset as filter to the slicer, selecting "is not blank or empty", but it didn't help me at all.

1 ACCEPTED SOLUTION
Idrissshatila
Super User
Super User

Hello @LucasCamargo ,

 

try the following

Calendar = CALENDARMIN(YourTableName[Date] ) , MAX( YourTableName[Date] ) )
 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin
Vote for my Community Mobile App Idea 💡



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Idrissshatila
Super User
Super User

Hello @LucasCamargo ,

 

try the following

Calendar = CALENDARMIN(YourTableName[Date] ) , MAX( YourTableName[Date] ) )
 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin
Vote for my Community Mobile App Idea 💡



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Hi Idris, thank you for the attention.

It kinda works, but not properly still.

LucasCamargo_0-1695931844590.png

If i select only the "Date" box, it shows me only the existing dates in my database, but when I select the month on Date Hierarchy, It still shows me all the 12 months, even don't having all of them on my database.

 

Hello @LucasCamargo ,

 

Yes because it takes the minimum of your data and max and gives you everything in between, if you need only the dates you have then you could use the column you have in your date table and add month, year and day columns to it.

 

Year = Year('Youtablename' [Date])
Month = format ( 'Youtablename' [Date], "mmmm")

Day = Day ( 'Youtablename' [Date])

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin
Vote for my Community Mobile App Idea 💡



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Thank you again Idris, I thought the "Date Hieararchy" had this filter by itself, but the way you put above worked.

The only thing is: before all that, I had an Excel Sheet with 2023 dates. Using an external database, I used Power Query to create a "week of month" column and structered it so that it started the week on Monday (Power BI normally starts weeks on Sundays).


Is it possible to create a Week of Month like that, without using Power Query? (Using the table I created with you step-by-step)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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