Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Count views per user

Hi all,

 

I have the following table in which I created a column "Grouped Views" that count the rows grouping user, date and views.

 

I used the following formula: 

 

Grouped views =
var x = table[User_Principal_Name]
var y = table[Date]
var z = table[Views]
return
COUNTROWS(
FILTER (
table, x = GroupBY_User_Report_Date[User_Principal_Name] && y = GroupBY_User_Report_Date[Date] && z = GroupBY_User_Report_Date[Views]
)
)
 
Nevertheless, what I need is a column that counts how many users have the same views in an especific date. The column should return this :

 

 Thanks in advance
 
  • Anonymous , Try a new column like

     

    calculate(distinctCOUNT([User_Principal_Name]), filter(Table, [Date] = earlier([Date]) && [views] = earlier([views]) ))

1 Reply

  • Anonymous , Try a new column like

     

    calculate(distinctCOUNT([User_Principal_Name]), filter(Table, [Date] = earlier([Date]) && [views] = earlier([views]) ))