Jun 26 2021 05:55 AM
Jun 26 2021 12:19 PM
That could be done using DAX measures, result is
I guess you have dates in your source, not just month names. To work with dates in data model it's strongly recommended to use Calendar (aka Date table), otherwise things could be overcomplicated.
You may create it directly in Power Pivot, set relationship with your table
With that measure could be
New Distinct Visitors:=VAR prevVisitors =
CALCULATETABLE (
VALUES ( Table1[Visitor] ),
PREVIOUSMONTH ( 'Calendar'[Date] )
)
VAR thisMonthVisitors =
VALUES ( Table1[Visitor] )
RETURN
COUNTROWS (
EXCEPT (
thisMonthVisitors,
prevVisitors
)
)
Creating PivotTable in rows use months from Calendar table, not from your one