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.
I have a table where I keep PersonId's from our application and then the first and last date of their subscriptions. These are normally in whole year spans. So the FirstSubStartDate would be 8/31/2021 and LastSubEndDate is 8/30/2022.
I also have a Reporting Calendar table that updates daily and allows me to chop up the data in any form I choose.
My struggle is finding a way to write a measure where I can choose what way to do a distinct count of these personid's and choose to graph it by year, month or whatever option I have in this reporting calendar.
Person Subscription Table
PersonId | FirstSubStartDate | LastSubEndDate |
1186 | 8/31/2020 | 8/30/2022 |
34859 | 2/10/2020 | 2/9/2021 |
34889 | 8/8/2020 | 8/7/2021 |
Here is what Im looking for:
I need a measure so when I put it into a bar or line graph and have Months for the X Axis, that it provides the distinct number of Id's in that month.
So in the above examples, if I was looking at Jan-Dec in 2021, 1186 would count once in each month where 34859 would count in Jan and Feb and then 34889 would count Jan-Aug. Only 1186 would count beyond 8/2021 because its LastSubEndDate goes into 2022.
Solved! Go to Solution.
Along with your example data I created a date table that was unrelated to the example data.
The measure I used was
You can then use the date hierarchy to view the data at the resolution you desire
Proud to be a Super User! | |
Along with your example data I created a date table that was unrelated to the example data.
The measure I used was
You can then use the date hierarchy to view the data at the resolution you desire
Proud to be a Super User! | |
I was really overthinking that. I had everthing except for the MIN/MAX. Thanks!
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 |
---|---|
97 | |
96 | |
82 | |
74 | |
66 |
User | Count |
---|---|
121 | |
105 | |
102 | |
82 | |
72 |