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

Daily distinct count on snapshots table

Hello,

I have daily snapshots table with snapshot_date, user_id and last_activity_at fields. The pair of user_id and last_activity_at is not unique, due to a number of snapshots can contain the same user_id and last_activity_at. I want to build just a line chart visual with distinct count of users through days. I have the dates table for the X axis, how to create the Y axis measure? Sounds like not something complicated, but I'm new in Power BI, please help.
Thanks.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @IgorChe ,

Please try to create a measure with below dax formula:

Distinct User Count = DISTINCTCOUNT('YourSnapshotTableName'[user_id])

Replace 'YourSnapshotTableName' with the actual name of your daily snapshots table.

Drag your date field from the dates table to the Axis area of the line chart. Then, drag the Distinct User Count measure you just created to the Values area.

 

Best regards,
Community Support Team_Binbin Yu
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

2 REPLIES 2
Anonymous
Not applicable

Hi @IgorChe ,

Please try to create a measure with below dax formula:

Distinct User Count = DISTINCTCOUNT('YourSnapshotTableName'[user_id])

Replace 'YourSnapshotTableName' with the actual name of your daily snapshots table.

Drag your date field from the dates table to the Axis area of the line chart. Then, drag the Distinct User Count measure you just created to the Values area.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you, v-binbinyu-msft
It's a right answer, I already tried it, but had wrong result because a relationship was broken. I fixed it and everything looks good now.
Thank you!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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