Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
Sorry for the title being kinda complex - I will try to explain better here:
I have the following (simplified) dataset. Anytime an employee changes (e.g. promoted or switched department) in their record, a new row is added at the end of the month The most recent row is blank.
I also have a date slicer:
I have created a calculated column that changes the blank date into the previous date + 1 month. I also have a measure that will give me the closest date for each employee that is less than the selected date, or if there isn't one, it will give me the calculated column date I just mentioned. To show you what I mean: see the 3 images below. The ID 4364 has the following end dates: 31/03/2022/ 31/07/2022 and blank. Therefore when I select June, the first date is the closest, for July the second date is closest and past July it will give my calculated column of the previous date +1 month (essentially the third blank date).
Here is the measure that gives me the closest date:
What I'm trying to do is run a count on ID based on the selected date that will only use the row that matches the above measure's calculated date for each ID. Here is what I've got so far.. but does not work:
Solved! Go to Solution.
Hi @Bananathan ,
Please have a try.
calculated date for each ID:
You can add the part:
measure =
CALCULATE (
COUNT ( ''[Id] ),
FILTER (
ALL ( 'Data' ),
'Data'[Previous Date + 1 month] = [Latest Selected Date]
&& 'data'[id] = SELECTEDVALUE ( 'data'[id] )
)
)
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Bananathan ,
Please have a try.
calculated date for each ID:
You can add the part:
measure =
CALCULATE (
COUNT ( ''[Id] ),
FILTER (
ALL ( 'Data' ),
'Data'[Previous Date + 1 month] = [Latest Selected Date]
&& 'data'[id] = SELECTEDVALUE ( 'data'[id] )
)
)
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
User | Count |
---|---|
92 | |
92 | |
84 | |
80 | |
49 |
User | Count |
---|---|
146 | |
137 | |
109 | |
68 | |
55 |