Forum Discussion
Axiomite
Resolver II
4 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
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
2 Replies
- JorgePinho
Solution Sage
MONTH 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
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