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.
I'm trying to calculate the number of sessions in my data. Sessions = a unique combination of Day + Cluster + User.
My data resembles this:
Date | Cluster | User |
Nov 1 | 111 | AAA |
Nov 2 | 222 | AAA |
Nov 2 | 333 | BBB |
Nov 2 | 333 | BBB |
Nov 3 | 444 | CCC |
Nov 3 | 333 | AAA |
In the above example, I want a calculation that results in this:
Ultimately, I want to know how many sessions per day, which I'd show in a table or chart.
Any help is appreciated.
Solved! Go to Solution.
Hi @rlongden ,
You may create a calculated column to concatenate those fields if you have other fields in your table:
UniqueID =
Table[Date] & Table[Cluster] & Table[User]
Then create a measure to count the distinct values:
Unique Count =
DISTINCTCOUNT ( Table[UniqueID] )
Proud to be a Super User!
Hi @rlongden ,
You may create a calculated column to concatenate those fields if you have other fields in your table:
UniqueID =
Table[Date] & Table[Cluster] & Table[User]
Then create a measure to count the distinct values:
Unique Count =
DISTINCTCOUNT ( Table[UniqueID] )
Proud to be a Super User!
Thanks to both of you. This gives me what I need. To danextian, you guessed right that my actual data has some other columns that I didn't want in the calculation. I was able to use your example to get it working.
Hi,
Drag Date to the Table visual. This measure works
Measure = COUNTROWS(DISTINCT(Data))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |