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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

Distinct count per day from 2 tables summarized by period

Hi, 

 

I'm new to Power BI and are looking to create a report to track product engagement over time.

For that I would need to track active users per day, week & month and compare those with the previous period. I'm having issues creating a formula that can display the distinct count of users PER DAY from the 2 tables.

 

I'm tracking active users from 2 tables (Feature Click & Page View), 1 user can appear in both tables on the same day, in that case the specific user should only appear as 1 count. 

 

I've tried using the formula below, but it doesn't seem to "reset" for each day and thereby doesn't allow comparisons to previous periods.

Distinct Count Page & Feature =
 COUNTROWS(
     DISTINCT(
         UNION(
             VALUES(Fact_Platform_Feature_Click[Platform_User_SK]),
             VALUES(Fact_Platform_Page_View[Platform_User_SK])
         )   
     )  
 )
 
Example data
Table 1:
Table 1Table 1
Table 2:
Table 2Table 2
Result I'm seeking:
Result i'm seekingResult i'm seeking
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Create a common Date and user tables and join both tables with these two tables.

 

Now create this measure and plot it with a common date column

 

measure = Countrows(Distinct(union(Distinct(Table1[User]), Distinct(Table2[User])) ) )

 

https://amitchandak.medium.com/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-solution-8e3eccb41bda

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Create a common Date and user tables and join both tables with these two tables.

 

Now create this measure and plot it with a common date column

 

measure = Countrows(Distinct(union(Distinct(Table1[User]), Distinct(Table2[User])) ) )

 

https://amitchandak.medium.com/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-solution-8e3eccb41bda

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks @amitchandak!

This appears to be working exactly how i wanted it to! 🙂 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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