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.
My data looks something like this:
PersonID Service Date 1 One 01-01-2019 1 One 02-01-2019 1 One 03-01-2019 1 Two 01-02-2019 1 Two 02-02-2019 1 Two 03-02-2019 1 Two 04-02-2019 2 One 01-03-2019 2 One 02-03-2019 2 One 03-03-2019 2 One 04-03-2019 2 Two 05-03-2019 2 Two 06-03-2019 2 Two 07-03-2019 3 One 01-04-2019 3 One 02-04-2019 3 One 03-04-2019 3 One 01-05-2019 3 One 02-05-2019 3 One 03-05-2019 3 One 04-05-2019 3 One 05-05-2019
I need to find out how many times someone started a service. It can be different services per person (as in [PersonID]=1 and 2), but it can also be the same service started twice (as in [PersonID]=3)
The measure for the above table should come up with the result = 6
I also need a measure for the final date, but I'm assuming that will be easy once I can figure out how to make the first measure work. The caveat for that is that the final date should <> Today()
Anyone?
Solved! Go to Solution.
I found the solution myself.
In our databases I found a unique ID for each [Service]
So I added columns for start and stop dates:
StartDate = CONCATENATE( CALCULATE ( MIN ( Services[Date] ); ALL ( Services ); Services[Service ID] = EARLIER ( Services[Service ID] ) ); " - " & Services[Service ID])
Concatenating them so that my measure is just a basic DISTINCTCOUNT, giving me the number of [StartDate].
Maybe not the most graceful way of doing it, but it worked as needed.
I found the solution myself.
In our databases I found a unique ID for each [Service]
So I added columns for start and stop dates:
StartDate = CONCATENATE( CALCULATE ( MIN ( Services[Date] ); ALL ( Services ); Services[Service ID] = EARLIER ( Services[Service ID] ) ); " - " & Services[Service ID])
Concatenating them so that my measure is just a basic DISTINCTCOUNT, giving me the number of [StartDate].
Maybe not the most graceful way of doing it, but it worked as needed.
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 |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |