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
schdef
Frequent Visitor

PBI Active Users calculation

Trying to calculate Monthly Active users with the follwoing measure:

 

MAU = CALCULATE(
    SUMX(VALUES('Usage '[Alias]),1),
    ALL('Usage'[FullDate]),
    DATESINPERIOD('Usage'[Date], LASTDATE('Usage'[Date]), -30, DAY)
)

 

This basically works fine and as expected. Using the measure in a trend chart, there is just one issue with the dates where we do not have distinct users - this leads to the situation that the DATESINPERIOD is not calculated correctly as there appears to be not start date. For this date only the users 30 days ago are being considered which is not what i  want. See the screenshot attached.


mau chart.JPG

Any thoughts how to fix that? Many thanks!

1 ACCEPTED SOLUTION
v-sihou-msft
Employee
Employee

@schdef

 

In this scenario, I don't understand why you have both [FullDate] and [Date] column in your table. I think your Usage table is a fact table which should include a Date column only. Then you can have another Full Date table and build relationship to Usage table. When can calculate the active users, you should use Full Date to limit the date range in DATESINPERIOD() function.

 

Regards,

View solution in original post

1 REPLY 1
v-sihou-msft
Employee
Employee

@schdef

 

In this scenario, I don't understand why you have both [FullDate] and [Date] column in your table. I think your Usage table is a fact table which should include a Date column only. Then you can have another Full Date table and build relationship to Usage table. When can calculate the active users, you should use Full Date to limit the date range in DATESINPERIOD() function.

 

Regards,

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.