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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Unable to get date ranges using firstdate

Hi, I have a manually created table where the user will pick from a drop down

MRUry7_1-1706794956631.png

 

MRUry7_2-1706795292501.png

 

I want it to get the correct starting date, depending on what the user clicks on above
In the example above, when I click All Data, the first date in the table appears.
But when I click on any other option here, the card on the right comes up blank.  Here's the code I'm using

_1 Start Date =
SWITCH (
   SELECTEDVALUE('_CalendarOptions'[Options]),
   "All Data", MIN('SingleMultiPageVisits'[MetricDate]),
   "Last Month", FIRSTDATE(DATESINPERIOD('SingleMultiPageVisits'[MetricDate], TODAY(), -2, MONTH)),
   "This Month", FIRSTDATE(DATESINPERIOD('SingleMultiPageVisits'[MetricDate], TODAY(), -1, MONTH)),
   "Last Year", FIRSTDATE(DATESINPERIOD('SingleMultiPageVisits'[MetricDate], TODAY(), -1, YEAR)),
   "Year Before That", FIRSTDATE(DATESINPERIOD('SingleMultiPageVisits'[MetricDate], TODAY(), -2, YEAR))
)

Needless to say, I have no idea why this isn't working for the rest of the options.
Would appreciate any help?
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

This is a table visual not a slicer:

vjunyantmsft_0-1706836379810.png

When you select the content in the table visual, It will only act as a highlight, without any filtering effect. Please change the table visual into a slicer.

vjunyantmsft_1-1706836520283.png


Best Regards,
Dino Tao
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

2 REPLIES 2
Anonymous
Not applicable

Thanks. I forgot all about that.

Anonymous
Not applicable

Hi @Anonymous ,

This is a table visual not a slicer:

vjunyantmsft_0-1706836379810.png

When you select the content in the table visual, It will only act as a highlight, without any filtering effect. Please change the table visual into a slicer.

vjunyantmsft_1-1706836520283.png


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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors