Forum Discussion
Creating a visualization with frequencies as categories
Hi randu ,
You can try formula like below:
Table =
VAR summarize_ =
SUMMARIZE (
FILTER (
YourTableName,
YourTableName[Day] <= MAX ( 'Date'[Date] )
&& YourTableName[Day] >= MIN ( 'Date'[Date] )
),
YourTableName[UserId],
"sumofsessions", SUM ( YourTableName[Sessions] )
)
VAR result =
ADDCOLUMNS (
summarize_,
"number of user",
COUNTX (
FILTER ( summarize_, [sumofsessions] = EARLIER ( [sumofsessions] ) ),
[UserId]
)
)
RETURN
SUMMARIZE ( result, [sumofsessions], [number of user] )
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Adamk,
Thanks for the solution provided. However, in this case it doesn't work for me. I think I didn't explained it properly.
In our case, the user wants to filter by date, so following the example, he can decide to check for only 1 day, or for 2 of them or all of three, but in our data we will have always all. So in your formula, since you are filtering the day to be between max and min dates from Date table, is not being really dynamic if the user wants to filter for one, two days or three days.
Thanks again for your answer. I really appreciate it.
Best Regards,
Albert