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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
SivaRamaKrishna
New Member

Help needed to create an engagement trend

Hi all,
I am trying to create a chart which should show the engagement percentage trend in a chart. It should take a measure in y-axis for percentage and event_date in x-axis with YearMonth.
The table has user_id, event_date, event_name.
The measure for y-axis is essentially a DIVIDE function with DISTINCTCOUNT of user_id for a specific month in the numerator and the denominator should be DISTINCTCOUNT of user_id till the end of the specified month.
I am able to create the numerator but unable to create the denominator.
#Numerator

Screenshot 2024-06-26 at 4.15.19 PM.png

UsersRunningTotal =
CALCULATE(
    DISTINCTCOUNT('engagement'[user_id]),
    FILTER(
        ALLSELECTED('engagement'[event_date]),
        ISONORAFTER('engagement'[event_date], MAX('engagement'[event_date]), DESC)
    )
)

But, I am unable to create the denominator as it also gives the same result as the numerator by taking identical user counts.
Ultimately the percentage is 100% for every month.
Example for denominator, the mesure should get the DISTINCTCOUNT of user_id from 2018-01-01 to end of March 2024,
from 2018-01-01 to end of April 2024, from 2018-01-01 to end of May 2024 and so on...

My failed attempt for denominator is,
TotalU =
VAR StartDate = DATE(2018, 1, 1)
RETURN
CALCULATE(
    DISTINCTCOUNT(engagement[user_id]),
    FILTER(engagement,
engagement[event_date] > StartDate
    engagement[event_date] <= Date(2024, 05, 31)
    )
)

Please help on how to achieve this.
2 REPLIES 2
Anonymous
Not applicable

Hi @SivaRamaKrishna ,

 

Did some_bih's answer help you? Have you tried his syntax?

 

If it helped you, please accept it as the solution. This will be of great help to other users who have similar problems as you.

 

If you have any other questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

some_bih
Super User
Super User

Hi @SivaRamaKrishna it is not easy to propose possible solution without model and other details.

Still, try v2 below

TotalU_v2 =
VAR StartDate = DATE(2018, 1, 1)
RETURN
CALCULATE(
DISTINCTCOUNT(engagement[user_id]),
FILTER(engagement,
engagement[event_date] > StartDate &&
engagement[event_date] <= Date(2024, 05, 31)
)
)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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