Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I have a Table: People with PeopleKey, LicenceExpiryDate, NextMedicalDate and NextEyeTestDate. I need to create a Pie Chart for each of these dates depending on the status: OK, Due or Overdue based on the selected Month. If the month is Sep 2024, then I compare the validity against the last of the selected month, i.e., 30-Sep-2023. Each Pie chart should also have drill through to the corresponding people.
I tried to create a measure (and similarly for other 2 dates status)
Solved! Go to Solution.
Hi AhadKarimi,
Thanks for your reply. I had got the pie chart and measures already. But I was not able to drill through from this pie chart to another page which holds the Table for People. For examply, if I select LicenceDue in the pie chart and then drill through, I am expecting to see only those People with LicenceStatus Due. But it was showing all records.
I have come up with a work-around for this by creating separate pages for LicenceDue, LicenceOK and LIcenceOverdue with tables and filtered to the respective Licence Status. It seems to be working.
Once again, thanks for your time and support. Appreciate it.
SWR.
Regards, SWR
Hi @SWR, try this measure below, and if you encounter any issues, let me know.
Modify your LicenceStatus measure:
LicenceStatus =
VAR SelectedMonthEnd = EOMONTH(MAX('Calendar'[Date]), 0) -- Get the last day of the selected month
VAR DaysForLicenceExpiry = DATEDIFF(SelectedMonthEnd, People[LicenceExpiryDate], DAY)
RETURN
SWITCH(
TRUE(),
ISBLANK(People[LicenceExpiryDate]), "Overdue",
DaysForLicenceExpiry < 0, "Overdue",
DaysForLicenceExpiry >= 0 && DaysForLicenceExpiry <= 30, "Due",
DaysForLicenceExpiry > 30, "OK"
)
Measures for pie chart statuses:
#PeopleLicenceDue =
CALCULATE(
COUNTROWS(People),
FILTER(People, [LicenceStatus] = "Due")
)Did I answer your question? If so, please mark my post as the solution! ✔️
Your Kudos are much appreciated! Proud to be a Solution Specialist!
Hi AhadKarimi,
Thanks for your reply. I had got the pie chart and measures already. But I was not able to drill through from this pie chart to another page which holds the Table for People. For examply, if I select LicenceDue in the pie chart and then drill through, I am expecting to see only those People with LicenceStatus Due. But it was showing all records.
I have come up with a work-around for this by creating separate pages for LicenceDue, LicenceOK and LIcenceOverdue with tables and filtered to the respective Licence Status. It seems to be working.
Once again, thanks for your time and support. Appreciate it.
SWR.
Regards, SWR
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |