cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PBInewbie21
Helper I
Helper I

Date slicer values in Table title

Is it possible to pull DateRange from Date slider slicer (From and To) and show on Table title or in normal Text box? And the values should change Date in Date Slicer  

1.PNG

Thanks!

1 ACCEPTED SOLUTION

Hi  @PBInewbie21 ,

 

Create a measure as below:

 

Measure = 
var _mindate=MINX(ALLSELECTED('Date'),'Date'[Date])
var _maxdate=MAXX(ALLSELECTED('Date'),'Date'[Date])
Return
"Orders from"&_mindate&" to "&_maxdate

 

Then click the table visual>format>title:on>format:

Screenshot 2020-11-05 153258.pngScreenshot 2020-11-05 153313.png

Finally you will see:

Screenshot 2020-11-05 153402.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

View solution in original post

6 REPLIES 6
NamishB
Post Prodigy
Post Prodigy

Hi @PBInewbie21 - Yes this is possible

Try creating a measure Something like:

 

Start Date =
IF (
ISFILTERED ( [TableName]) && HASONEVALUE ([TableName] ),
FIRSTNONBLANK(TableName[Start Date],0))
End Date =
IF (
ISFILTERED ( [TableName]) && HASONEVALUE ([TableName] ),
FIRSTNONBLANK(TableName[End Date],0))

 

and dispay these 2 fields in a speperate cards

 

Or

 

Make another measure something like:

Orders From [Start Date measurse] to [End Date measure]

 

Hope this helps.

 

Cheers,

-Namish B

 

Thanks @NamishB for your reply.

I do not have Start date and End date columns in my Order table. It only has Name, Order Date and Qty columns.

Also, I want to grab values from Date range boxes, Is it possible? Attaching the image for clearity.

So, I want to see Table Title 'Orders from 1/1/2020 to 6/16/2020' 

with @amitchandak 's syntax it shows Orders from 1/1/2020 to 5/1/2020 as there are no more records after 5/1/2020 in Orders table. Any idea?

 

1.PNG

 

Hi  @PBInewbie21 ,

 

Create a measure as below:

 

Measure = 
var _mindate=MINX(ALLSELECTED('Date'),'Date'[Date])
var _maxdate=MAXX(ALLSELECTED('Date'),'Date'[Date])
Return
"Orders from"&_mindate&" to "&_maxdate

 

Then click the table visual>format>title:on>format:

Screenshot 2020-11-05 153258.pngScreenshot 2020-11-05 153313.png

Finally you will see:

Screenshot 2020-11-05 153402.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

View solution in original post

Hi @v-kelly-msft ,

Thanks for attaching all the screenshots and .pbix file too. Helps the newbie like me. Looks like all of the above replies would help if my date table had rows for every single day. 

Noticed that my Date table has some rows missing and that's why it pickes date value from Order table.

 

amitchandak
Super User IV
Super User IV

@PBInewbie21 , You can use dynamic Title

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-format-visual-titles

 

create a measure like this and use in the title

New Measure  =

"Order from " & Minx(allselected('Date'),'Date'[Date]) & " " & Minx(allselected('Date'),'Date'[Date])



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Thanks for quick reply @amitchandak . 

I used MAXX function in the DAX you provided 

New Measure  =

"Order from " & Minx(allselected('Date'),'Date'[Date]) & " " & Maxx(allselected('Date'),'Date'[Date])

Problem is it is showing thr min and max date from Date table but not the exact date which is entered/ picked in Date slicer.

Is it possible to grab values from Date range boxes?

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

March Update

Check it Out!

Click here to read more about the March 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.