Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Icon for Administrator rankAdministrator
4 years ago
Solved

display dates in a filter.

Good, I want to show the filters that I have selected and they work all except the date.

Since I can show the selected date, all the data is in the same table. I give you the example.

Aguirre_0-1652100891369.png

  • MFelix's avatar
    MFelix
    4 years ago

    Hi Aguirre ,

     

    In the expression you are using the problem is that you did not close the ALLSELECTED expression try the following:

    e_Fechas2 =
    VAR _max =
        MAXX (
            ALLSELECTED ( BI_EXPEDIENTES_USUARIO ),
            BI_EXPEDIENTES_USUARIO[FECHA_APERTURA]
        )
    VAR _mIN =
        MAXX (
            ALLSELECTED ( BI_EXPEDIENTES_USUARIO ),
            BI_EXPEDIENTES_USUARIO[FECHA_APERTURA]
        )
    RETURN
        _Max & _Min

5 Replies

  • Syndicate_Admin , Not very clear

     

    new measure =
    var _max = maxx(allselected(Date),Date[Date])
    var _min = minx(allselected(Date),Date[Date])
    return

    "From " & _min & " to " & _max

     

     

    Measure = concatenatex(allselected(Date), Date[Date], " , " )

    • Syndicate_Admin's avatar
      Syndicate_Admin
      Icon for Administrator rankAdministrator

      Hello and first of all thank you.

      I have achieved something, but not as you tell me, since it gives me an error, the problem I have with the allselect, I put my measurement that works, but that is not complete and I tell you, in case you can indicate the failure, as I tell you, I do not have a calendar table, but a column in the table that contains all the data.

      This works but is incomplete:

      e_Fechas =
      WHERE _max = MAXX(F_BI_EXPEDIENTES_USUARIO, F_BI_EXPEDIENTES_USUARIO[FECHA_APERTURA])
      WHERE _min = MINX(F_BI_EXPEDIENTES_USUARIO, F_BI_EXPEDIENTES_USUARIO[FECHA_APERTURA])
      return "Del "&_min &" to"& _max
      I think I have the problem in the maxx and in the minx

      Aguirre_1-1652113793531.png

      Aguirre_3-1652113888528.png

      Greetings


      • MFelix's avatar
        MFelix
        Icon for Super User rankSuper User

        Hi Aguirre ,

         

        In the expression you are using the problem is that you did not close the ALLSELECTED expression try the following:

        e_Fechas2 =
        VAR _max =
            MAXX (
                ALLSELECTED ( BI_EXPEDIENTES_USUARIO ),
                BI_EXPEDIENTES_USUARIO[FECHA_APERTURA]
            )
        VAR _mIN =
            MAXX (
                ALLSELECTED ( BI_EXPEDIENTES_USUARIO ),
                BI_EXPEDIENTES_USUARIO[FECHA_APERTURA]
            )
        RETURN
            _Max & _Min