Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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

 

 

1 ACCEPTED SOLUTION

@Anonymous,

Please check DAX in attached PBIX file.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
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

 

 

 

image.png

 

@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

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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

@Anonymous,

Please check DAX in attached PBIX file.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

thanks

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.