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
Syndicate_Admin
Administrator
Administrator

cumulative count

Good, hoping you are well.

I would like to know how I can generate a cumulative measure, I have two tables, one of users with the date on which they registered and another of the calendar, I would like to know how I can count and accumulate to see the increase of users per day based on the calendar table, example:

Users table:

UserRegisterLoud
Usuario1101/01/2021
usuario2101/05/2021
usuario31 01/03/2021

Calendar table:

DateMonthweekDay
01/01/2021111
02/01/2021112
03/01/2021113
04/01/2021114
05/01/2021115
06/01/2021116
07/01/2021117
08/01/2021121
09/01/2021122

Matrix to be generated:

01/01/202102/01/202103/01/202104/01/202105/01/202106/01/202107/01/2021
1122333

I tried the following but it goes wrong:

Count =
was totalA=
CALCULATE(SUM(agent[Register]),
FILTER(
ALLSELECTED(Calendar[Date]),ISONORAFTER(Calendar[Date],MAX(Calendar[Date]),DESC)))
return IF(ISBLANK(totalA),0,totalA)

Thank you in advance.

Best regards

1 REPLY 1
amitchandak
Super User
Super User

@Syndicate_Admin , measure seem fine. Make sure calendar is connected  agent on the date.

 

Try one of the two

 

CALCULATE(SUM(agent[Register]),
FILTER(
ALLSELECTED(Calendar[Date]),Calendar[Date]< = MAX(Calendar[Date])))

 

or

 

 

CALCULATE(SUM(agent[Register]),
FILTER(
ALL(Calendar[Date]),Calendar[Date]< = MAX(Calendar[Date])))

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.