Forum Discussion

Katia1688's avatar
Katia1688
Regular Visitor
2 years ago

MTD/YTD Time Intelligence Buttons

Spoiler
 

Hi all,

I browsed a lot of articles and videos, but it seems no solution can fix my problem. Can anyone help?
I make a dashboard as below and would like to add on MTD/YTD buttons to ease operation of report consumer.

I use several methods to set up the button, the lastest one I use is:

1) build a selected period table,

PeriodPeriod ID
MTD1
QTD2
YTD3

Create a measure

SelectedPeriod = MIN(SelectedPeriod[PeriodID])
 

2) Set up a slicer by [Period]

3) Set up a measure

MTD/QTD/YTD =
VAR PeriodSelection= SELECTEDVALUE(SelectedPeriod[PeriodID])
VAR Month_to_Date= MAX('Calendar'[Date]) IN DATESMTD('Calendar'[Date])
VAR Quarter_to_Date= MAX('Calendar'[Date]) IN DATESQTD('Calendar'[Date])
VAR Year_to_Date= MAX('Calendar'[Date]) IN DATESYTD('Calendar'[Date])
RETURN
INT(SWITCH( PeriodSelection,
1, Month_to_Date,
2, Quarter_to_Date,
3, Year_to_Date
))
 

4) In the video, it suggest to drag the measure to "filter pane/filters on this visual". Seletec "advanced filter", is "1", "apply filter"
But when I drag the measure to "filter pane/filters on this page", it doesn't allow me to add the slicer.
when I drag the measure to "filter pane/filters on this visual" (the line and clustered column chart), nothing happen.

Can anyone help me? I already spent HOURS on it.

many many thanks,

K

 

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Katia1688 You should be using that measure in whatever visual you want the time intelligence value to display. I don't see any logic in adding it to a filters pane or as a filter to a slicer, that doesn't make any sense.

    • Katia1688's avatar
      Katia1688
      Regular Visitor

      Thank you Greg. Do you have any suggestions for activating the buttons?

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        Katia1688 I would use a slicer and set it to horizontal. Provides the feel of buttons without being actual buttons. If you wanted to use real buttons, it's possible but involves quite a bit of work and trickery with the Bookmark and Selection panes. Basically, you put the slicer on the page. You create a bookmark for each button you want. When you create the bookmark, select the slicer and select the option your want. Create your bookmark such that it only impacts the selected visual (the slicer). Hide the slicer in the selection pane and update your bookmarks. You then tie each button to one of the bookmarks created. Now your buttons activate a bookmark which changes the hidden slicer on the page. It's a real pain but should work.