Forum Discussion

dnaman's avatar
dnaman
Helper I
8 years ago
Solved

Cumulative Totals for Map Visualization

Hi All,   My data set is logon activity (for an application) by month by office   Columns are: LogonDate (datetime) Reporting Office (i.e. <cityname> Toronto, Los Angeles, etc)   I would like...
  • Anonymous's avatar
    Anonymous
    8 years ago

    dnaman,

    I create a sample table named Logon, firstly create a Date column and count column using DAX below in the table.

    Date = DATE(YEAR(Logon[LogonDate]),MONTH(Logon[LogonDate]),DAY(Logon[LogonDate]))
    Count = CALCULATE(COUNTA(Logon[Reporting Office]))


    Secondly, create a calendar table using DAX below. Create relationship between the calendar table and Logon table using date field.

    Date = CALENDAR(DATE(2016,1,1),DATE(2018,12,31))

    Thirdly, create the following measure to calculate cummulative count of logon activity in  the Logon  table.
    cummulative = CALCULATE(SUM(Logon[Count]),FILTER(ALL('Date'),'Date'[Date]<=MAX('Date'[Date])))

    Create a map visual as shown in the following screenshot. You still need  to click Month in the timeline slicer to filter the map, but don't need to hold SHIFT to select all months to calculate cummulative value in map.


    Regards,
    Lydia