Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have data on user surveys like this:
The classification given to each user as a result is always valid until the user fills in another survey. So in my example data for example for user 1 classification was 1 between January 1st and July 31st and from August 1st onwards the classification is 4.
Now what I would have to do is to calculate how many distinct users there were per each service per each classification AND I would need to use a date slicer to define on which time range I would like to see the number of distinct users. And each user should be recorded there only was and their most recent classification value should be used. So e.g. when looking at year 2022 for service X user 1 should be calculated only under classification 4, not under classification 1.
I have created a separate calendar/Date table.
I have tried a lot of things, as my last option a summarized/(grouped) table where I grouped it by CustomerID and created a column with MAX(SurveyDate) but that obviously will not dynamically change based on date slicer to show the newest survey result on that date range...
Does anyone have suggestions how to solve this? I am quite new to solving questions like this in PowerBI so all ideas are appreciated... Thanks!
@Anonymous , Create a second date first, that ill like end date
end Date=
var _date= minx(filter(Table, [Customer ID] = earlier([Customer ID]) && [Start Date] > earlier([Start Date]) ), [Start Date])
return
if(isblank(_date), blank(), _date -1)
Thanks @amitchandak , managed to do as you instructed! Will continue to try to solve rest of the problem with this.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
10 | |
6 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
10 | |
6 |