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.
Hi,
I'm trying to work out the number of dates where my number of sessions is greater than or equal to one.
I've tried:
Number of Days With A sessions = CALCULATE(DISTINCTCOUNT('All Web Site Data'[Sessions]), Filter('All Web Site Data', ))
But I can't seem to work out how to Filter so that the Sessions values have to equal to or greater than 1.
I'm working to an end goal of being able to create a visualisation with a horizontal bar chart showing the number of days where there are more than say 1 visitor, 5, 10, 15.
I've taken some inspiration from:
http://community.powerbi.com/t5/Desktop/Hotel-occupancy-rates/td-p/43265/page/2
http://community.powerbi.com/t5/Desktop/Number-of-working-days/m-p/22842#M7236
Solved! Go to Solution.
To create a visualization with a horizontal bar chart showing the number of days where there are more than say 1 visitor, 5, 10, 15, you can create another table for slicer to select the visitor number. And create a measure using FILTER() to get the results with following steps:
NumOfDates_NumOfSessions_GreaterOrEqual = IF ( ISFILTERED ( 'More Than'[More Than Num] ) = FALSE (), BLANK (), CALCULATE ( DISTINCTCOUNT('All Web Site Data'[Date]), FILTER ( 'All Web Site Data', 'All Web Site Data'[Sessions] >= MAX ( 'More Than'[More Than Num] ) ) ) )
To categorize the top 10 for example most occurring number of sessions, you can create a rank column and another calculated Top10 table which only shows the top 10 with following steps:
Occuring_Num_Of_Sessions = CALCULATE ( DISTINCTCOUNT ( 'All Web Site Data'[Date] ), ALLEXCEPT ( 'All Web Site Data', 'All Web Site Data'[Sessions] ) )
Rank_Column = RANKX ( ALL ( 'All Web Site Data' ), [Occuring_Num_Of_Sessions],,, DENSE )
Top10Table = CALCULATETABLE ( 'All Web Site Data', 'All Web Site Data'[Rank_Column] <= 10 )
@ElliotP easy way to do would be to use conditional columns via query editor where Sessions value is equal to greater than 1, then use new created column to get number of days. You can also simply drag and drop Sessions field onto visual, set it as Count and then use filter to filter it where value is greater or equal to 1.
It's a good solution; but probably not the best one long term.
I'm looking to be able to catagorise the top 10 for example most occuring number of sessions.
So say there are:
10 dates with 1 session.
15 dates with 10 sessions.
15 dates with 12 sessions
3 dates with 100 sessions.
The number of times 100 sessions happens, then the number of times 12 sessions, ranked.
To create a visualization with a horizontal bar chart showing the number of days where there are more than say 1 visitor, 5, 10, 15, you can create another table for slicer to select the visitor number. And create a measure using FILTER() to get the results with following steps:
NumOfDates_NumOfSessions_GreaterOrEqual = IF ( ISFILTERED ( 'More Than'[More Than Num] ) = FALSE (), BLANK (), CALCULATE ( DISTINCTCOUNT('All Web Site Data'[Date]), FILTER ( 'All Web Site Data', 'All Web Site Data'[Sessions] >= MAX ( 'More Than'[More Than Num] ) ) ) )
To categorize the top 10 for example most occurring number of sessions, you can create a rank column and another calculated Top10 table which only shows the top 10 with following steps:
Occuring_Num_Of_Sessions = CALCULATE ( DISTINCTCOUNT ( 'All Web Site Data'[Date] ), ALLEXCEPT ( 'All Web Site Data', 'All Web Site Data'[Sessions] ) )
Rank_Column = RANKX ( ALL ( 'All Web Site Data' ), [Occuring_Num_Of_Sessions],,, DENSE )
Top10Table = CALCULATETABLE ( 'All Web Site Data', 'All Web Site Data'[Rank_Column] <= 10 )
Evening,
Sorry for not responding sooner, I've been busy.
Thank you so much, I really appreciate it.
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 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |