Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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)
User | Count |
---|---|
101 | |
90 | |
79 | |
70 | |
70 |
User | Count |
---|---|
112 | |
96 | |
96 | |
75 | |
72 |