Forum Discussion
Axiomite
Resolver II
3 years agoIf in selected month
Hi, Trying to use the slicer selected month rather the current month This works: But having an error on the following: Can anyone help. Kind regards, Niel
- 3 years ago
JorgePinho - many thanks for your reply. I used a work around by created a column displaying current month and year.
Filter Date =VAR __max = MAXX(factTable,factTable[TxDate])VAR __year = YEAR(__max)VAR __day = DAY(__max)VAR __month = MONTH(__max)RETURNDATE(__year,__month-3,__day)
I have then gone and used the other date and compared it with the Filter Date column in the above if statement and it solve my problem.
Kind Regards,Niel
JorgePinho
Solution Sage
3 years agoMONTH doesn't allow a column has argument, so you have to use a summarize function. Try to correct it to MONTH(MAX([First ...]))
Axiomite
Resolver II
3 years agoJorgePinho - many thanks for your reply. I used a work around by created a column displaying current month and year.
Filter Date =
VAR __max = MAXX(factTable,factTable[TxDate])
VAR __year = YEAR(__max)
VAR __day = DAY(__max)
VAR __month = MONTH(__max)
RETURN
DATE(__year,__month-3,__day)
I have then gone and used the other date and compared it with the Filter Date column in the above if statement and it solve my problem.
Kind Regards,
I have then gone and used the other date and compared it with the Filter Date column in the above if statement and it solve my problem.
Kind Regards,
Niel