Forum Discussion
undefined
- Anonymous6 years ago
Hi Anonymous ,
Please check the following steps.
1# Create a calendar table and a calculated calculated column "yearmonth" as slicer.
CALENDAR = CALENDAR(MIN('Table'[date]),MAX('Table'[date])) yearmonth = FORMAT('CALENDAR'[Date],"YYYYMM")2# Create two measures one for current month visual, another for previous visual.
Measure = IF(FORMAT(SELECTEDVALUE('Table'[date]),"YYYYMM")=SELECTEDVALUE('CALENDAR'[yearmonth]),1,0) Measure 2 = IF(format(EDATE(SELECTEDVALUE('Table'[date]),1),"YYYYMM")=SELECTEDVALUE('CALENDAR'[yearmonth]),1,0)3# Add measure to visaual level filter. Result would be shown as below.
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Please check the following steps.
1# Create a calendar table and a calculated calculated column "yearmonth" as slicer.
CALENDAR = CALENDAR(MIN('Table'[date]),MAX('Table'[date]))
yearmonth = FORMAT('CALENDAR'[Date],"YYYYMM")
2# Create two measures one for current month visual, another for previous visual.
Measure = IF(FORMAT(SELECTEDVALUE('Table'[date]),"YYYYMM")=SELECTEDVALUE('CALENDAR'[yearmonth]),1,0)
Measure 2 = IF(format(EDATE(SELECTEDVALUE('Table'[date]),1),"YYYYMM")=SELECTEDVALUE('CALENDAR'[yearmonth]),1,0)
3# Add measure to visaual level filter. Result would be shown as below.
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.