Forum Discussion
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
- Anonymous8 years ago
Anonymous,
Please check DAX in attached PBIX file.
Regards,
Lydia
5 Replies
- AnonymousNot 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
- AnonymousNot 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- AnonymousNot 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:
- use favorites, but the report's number will be the same (44).
- 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.?)
- both slicer dates? but must be independent and if I use one them the data will be filtered for the other
thanks
Cod.Socio Fecha Cuota Habilitación Associate_type Fecha Contable Tipo de Entrada Tipo Cuota 1 01/01/0001 A01D 01/01/0001 Payment Ordinary 1 01/06/2003 A01E 22/07/2003 Payment Ordinary 1 01/07/2003 A01E 23/09/2003 Payment Ordinary 1 01/08/2003 A01E 29/09/2003 Payment Ordinary 1 01/09/2003 A01E 14/10/2003 Payment Ordinary 1 01/10/2003 A01E 04/11/2003 Payment Ordinary 1 01/11/2003 A01E 01/12/2003 Payment Ordinary 1 01/12/2003 A01E 01/12/2003 Payment Ordinary 1 01/01/2004 A01E 01/01/2004 Payment Ordinary 1 01/02/2004 A01E 01/02/2004 Payment Ordinary 1 01/03/2004 A01E 01/03/2004 Payment Ordinary 1 01/04/2004 A01E 01/04/2004 Payment Ordinary 1 01/05/2004 A01E 01/05/2004 Payment Ordinary 1 01/06/2004 A01E 01/06/2004 Payment Ordinary thanks