Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dnaman
Helper I
Helper I

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 to show the progression of logon activity from the beginning of my dataset (2016) to current (2018), using a slider (Timeline perhaps), and as i slide across by month, the circles representing the total count of LogonActivity in a location gets larger.

 

So it would show how the activity/usage of this application has grown over the past 15-16 months by location.

 

I've tried to use the Map visualization and the Timeline slicer and the only way i can 'hack' this, is if i hold SHIFT down while starting at the first date, and then clicking the subsequent month one at a time.

 

Is there a better way to show this? Can it be animated or automated?

 

Thanks in advance.

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@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]))
1.0.JPG

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.
1.JPG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yuezhe-msft
Employee
Employee

@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]))
1.0.JPG

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.
1.JPG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi 

I am having the same problem and was hoping to use your solution, but creating the date column i get the error "A single value for column x cannot be determined"

 

Any ideas on how to solve this? 

Thanks 

Chris

@v-yuezhe-msft that works! The only grip i have now is that the size of the circles do not really 'grow' or scale relative to the other circles. Meaning the size of the circle for cumulative value 10 is basially the same cirzle size for cumulative value 100

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.