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.
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!
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 )
)
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.
Thankyou for your help. It should work
@Anonymous ,
first is max or last unless u need the format
First = max(Date[Date])
second = min(Date[Date]) & " - " & max(Date[Date])
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
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/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)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
95 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |