Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Show date range from relative date filter

I have a visual level filter on my invoice date that is relative date filtering for this week.

 

 

 

How would I get that date range to show in my title card? Here is the current DAX I am using for the title card that also accounts for a "global" slicer that I have on the whole report. (Sorry about my potentially weird formatting on the DAX).

 

 
Parts Weekly Titlecard = "Parts Weekly Scoreboard | " &
IF(AND(ISFILTERED('Variable Budget Calendar'[Year-Month]),
VALUE(RIGHT(SELECTEDVALUE('Variable Budget Calendar'[Year-Month],""),2)) = MONTH(today())),
"Showing Progress as of: "&TODAY(),
"Showing Results for: " &SELECTEDVALUE('Variable Budget Calendar'[Year-Month],"No Date Selected"))

 

 

 

 

So obviously the chunk in question comes after "Showing Progress as of: " (I have it as TODAY() right now just because it works)

 

I was thinking (MIN(SELECTEDVALUE('Parts Counter with Avgs'[InvoiceDate]) & " - " & MAX(SELECTEDVALUE('Parts Counter with Avgs'[InvoiceDate])) or some variant thereof would work but am having no luck. Even just SELECTEDVALUE('Parts Counter with Avgs'[InvoiceDate]) returns a blank.

 

Thanks!

  • Anonymous's avatar
    Anonymous
    7 years ago

    Gonna go out on a limb here and answer my own question.

     

    Here is the working DAX. Just gotta make sure the card has the same filter!

     

    "Showing Progress as of: "&MIN('Parts Counter with Avgs'[InvoiceDate])&" - "&MAX('Parts Counter with Avgs'[InvoiceDate])

     

    Parts Weekly Scorecard = "Parts Weekly Scoreboard | " &
    IF(AND(ISFILTERED('Variable Budget Calendar'[Year-Month]),
    VALUE(RIGHT(SELECTEDVALUE('Variable Budget Calendar'[Year-Month],""),2)) = MONTH(today())),
    "Showing Progress as of: "&MIN('Parts Counter with Avgs'[InvoiceDate])&" - "&MAX('Parts Counter with Avgs'[InvoiceDate]),
    "Showing Results for: " &SELECTEDVALUE('Variable Budget Calendar'[Year-Month],"No Date Selected"))

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Gonna go out on a limb here and answer my own question.

     

    Here is the working DAX. Just gotta make sure the card has the same filter!

     

    "Showing Progress as of: "&MIN('Parts Counter with Avgs'[InvoiceDate])&" - "&MAX('Parts Counter with Avgs'[InvoiceDate])

     

    Parts Weekly Scorecard = "Parts Weekly Scoreboard | " &
    IF(AND(ISFILTERED('Variable Budget Calendar'[Year-Month]),
    VALUE(RIGHT(SELECTEDVALUE('Variable Budget Calendar'[Year-Month],""),2)) = MONTH(today())),
    "Showing Progress as of: "&MIN('Parts Counter with Avgs'[InvoiceDate])&" - "&MAX('Parts Counter with Avgs'[InvoiceDate]),
    "Showing Results for: " &SELECTEDVALUE('Variable Budget Calendar'[Year-Month],"No Date Selected"))