Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Number of distinct users per service and survey result filtered with date slicer

Hi,

 

I have data on user surveys like this:

FredFinn_0-1675874656825.png

 

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!

2 REPLIES 2
amitchandak
Super User
Super User

@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)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks @amitchandak , managed to do as you instructed! Will continue to try to solve rest of the problem with this.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.