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
Anonymous
Not applicable

Print dates selected from slider on a card

Please help me to print dates selected from slicer on a card.

Case 1: single date ( 06/22/2020)  :

PRINT: 06/22/2020

 

case 2 : range of dates ( 06/15/2020 - 06/22/2020)

PRINT: 06/15/2020 - 06/22/2020

 

How do I print on a card for either of the cases?

 

Thanks in advance!

 

5 REPLIES 5
v-zhenbw-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can create a measure to meet your requirement.

 

Measure =
VAR select_ =
    SELECTEDVALUE ( 'Table'[Date] )
VAR select_max =
    MAX ( 'Table'[Date] )
VAR select_min =
    MIN ( 'Table'[Date] )
RETURN
    IF (
        HASONEVALUE ( 'Table'[Date] ),
        CONVERT ( select_, STRING ),
        CONVERT ( select_min, STRING ) & "-"
            & CONVERT ( select_max, STRING )
    )

 

Print1.jpg

 

print2.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

BTW, pbix as attached.

 

Best regards,

 

Community Support Team _ zhenbw

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

Anonymous
Not applicable

Thankyou for your help. It should work

amitchandak
Super User
Super User

@Anonymous ,

first is max or last unless u need the format


First = max(Date[Date])


second = min(Date[Date]) & " - " & max(Date[Date])

Anonymous
Not applicable

Note : For both of the cases, only one card should be used interchangeably as per the case.

Hi @Anonymous ,

 

Have a look at this video which 

Date Harvest Deep Dive - Power BI Time Intelligence

 

https://www.youtube.com/watch?v=mm-Lv6lv4a4&t=500s

 

 

 

https://community.powerbi.com/t5/Desktop/Display-slicer-values-selected-in-card/td-p/559294

https://community.powerbi.com/t5/Desktop/From-Date-slicer-display-the-selected-date-range-in-text-box-or/td-p/617717

 

https://community.powerbi.com/t5/Desktop/Date-range-in-dynamic-text-box/m-p/951823

 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

 

 

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.