Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
4 years ago

Link a date range selector to a nested column graph

Good afternoon

My goal is to link a date picker to the graph I have created.

As you can see I have a combo where I can select the different lines and this one works without problem. On the other hand, when I move the date range, the columns in the graph are not updated.

The table from which the date data comes out is created as follows:

Calendar =

where _cal = CALENDAR(MIN('tabla1'[Fecha1_TIMESTAMP]), Max('tabla1'[Fecha2_TIMESTAMP]))
return
ADDCOLUMNS(_cal,"Year", YEAR([Date]), "Month Num", MONTH([Date]), "Month Name", FORMAT([Date], "mmmm"))

- For the date picker, I have the following measure created:

InDateRange =
0 - Not in range
1 - is in range
Where _rangeStart =
FIRSTDATE ( 'Calendar'[Date] )
Where _rangeEnd =
LASTDATE ( 'Calendar'[Date] )
RETURN
IF (
SELECTEDVALUE ( tabla1[Fecha1_TIMESTAMP - DATE] ) >= _rangeStart
&& SELECTEDVALUE ( tabla1[Fecha2_TIMESTAMP - DATE] ) <= _rangeEnd
&& SELECTEDVALUE ( tabla1[Fecha2_TIMESTAMP _TIMESTAMP - DATE] ) <> BLANK(),
1,
0
)

Thank you for your help

3 Replies

    • Syndicate_Admin's avatar
      Syndicate_Admin
      Administrator

      Good morning

      You could explain it to me a little more, I have little in this world of Power Bi and I do not understand what you want to tell me.

      Thank you so much

      • Syndicate_Admin's avatar
        Syndicate_Admin
        Administrator

        Also comment that the configuration of the graph on the x axis and on the y axis is as follows.

        * When I put the measure InDateRange in the filters of the page

        The graph appears empty to me. When I move the date picker, in the upper left margin of the graph it appears for a second as data is loaded and also the record counter moves according to the selection but I do not see the columns of the selected lines.

        * On the contrary if I do the same but the measure I put it to 0, the columns appear but their size does not change depending on the date range seccionado. In this case also the record counter is moved according to the selection of dates made and in the graph also appears in the upper left margin the data loading icon for a second but as I say the size of the columns is not modified.

        I hope I have clarified something else.

        Thank you