Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

One slicer for two dates

hi,

I have to make the same report, the difference is the date.

"accounting date" and "quote day".

 

the date slicer changes with the user seleccion 

 

thanks

 

vergara

 

 

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    I have tried,

     

    the user can choose what date: "accounting date" or "quote day".

     

    Selection AccountingorQuota = SELECTEDVALUE('2AccountingorQuota'[AccountingorQuota];BLANK())

     

    in a calculate column:

     

    Date = IF([Selection AccountingorQuota]="accounting date"; ALL('2accountingdate'[accountingdate]);

    ALL('2quotadate'[quotadate]))

     

    but  the column is empty

     

     

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Anonymous,

      Calculated column will not respond to slicer selection, see this Power BI KB.

      Create measures instead. 

      Selection AccountingorQuota = SELECTEDVALUE('2AccountingorQuota'[AccountingorQuota];BLANK())
      Date= IF([Selection AccountingorQuota]="accounting date"; MAX('2accountingdate'[accountingdate]);MAX('2quotadate'[quotadate]))


      If the above DAX don't work, please share sample data of your table and post expected result following the guide in this thread.

      Regards,
      Lydia

      • Anonymous's avatar
        Anonymous
        Not applicable

        thanks for helping me.

         

        (Your idea returns an only one value.)

         

        Maybe if I explain to you my problem...

        I have to make 44 reports, but always are couples one with "fecha contable" another for "fecha cuota" and always the visualization is table or matrix.

         

        If I can get that the user can choose on the same page change between "fecha cuota" and "fecha contable". The reports will be 22.

         

        So I had thought:

        1. use favorites, but the report's number will be the same (44).
        2. having a selector, the user can choose which date, he wants to see. (i was trying this)
          • I have created two date tables
          • one with "fecha cuota" and the other with "fecha contable."
          • Another table connected with my both dates tables where the user selects the option. 

            But I can't do it working. I have tried like measure and as column calculate (because I want a slight)

            (If I have understood right the link that you send me. It's not possible to make it with calculated columns but neither like measures.?) 

        3. both slicer dates? but must be independent and if I use one them the data will be filtered for the other

        thanks 

        Cod.SocioFecha CuotaHabilitaciónAssociate_typeFecha ContableTipo de EntradaTipo Cuota
        101/01/0001 A01D01/01/0001PaymentOrdinary
        101/06/2003 A01E22/07/2003PaymentOrdinary
        101/07/2003 A01E23/09/2003PaymentOrdinary
        101/08/2003 A01E29/09/2003PaymentOrdinary
        101/09/2003 A01E14/10/2003PaymentOrdinary
        101/10/2003 A01E04/11/2003PaymentOrdinary
        101/11/2003 A01E01/12/2003PaymentOrdinary
        101/12/2003 A01E01/12/2003PaymentOrdinary
        101/01/2004 A01E01/01/2004PaymentOrdinary
        101/02/2004 A01E01/02/2004PaymentOrdinary
        101/03/2004 A01E01/03/2004PaymentOrdinary
        101/04/2004 A01E01/04/2004PaymentOrdinary
        101/05/2004 A01E01/05/2004PaymentOrdinary
        101/06/2004 A01E01/06/2004PaymentOrdinary

        thanks