Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Student | Subject Code | Date | Register Mark |
1001 | MATH22 | 22/09/2022 | Sick |
1001 | GEO22 | 22/09/2022 | Sick |
1001 | PHY22 | 22/09/2022 | Sick |
1001 | MATH22 | 21/09/2022 | Present |
1001 | GEO22 | 21/09/2022 | Present |
1001 | PHY22 | 21/09/2022 | Present |
1001 | MATH22 | 18/09/2022 | Sick |
1001 | GEO22 | 18/09/2022 | Present |
1001 | PHY22 | 18/09/2022 | Present |
1001 | MATH22 | 16/09/2022 | Present |
1001 | GEO22 | 16/09/2022 | Present |
1001 | PHY22 | 16/09/2022 | Present |
1002 | MATH22 | 22/09/2022 | Present |
1002 | GEO22 | 22/09/2022 | Present |
1002 | PHY22 | 22/09/2022 | Present |
1002 | MATH22 | 21/09/2022 | Present |
1002 | GEO22 | 21/09/2022 | Present |
1002 | PHY22 | 21/09/2022 | Present |
1002 | MATH22 | 18/09/2022 | Present |
1002 | GEO22 | 18/09/2022 | Present |
1002 | PHY22 | 18/09/2022 | Present |
1002 | MATH22 | 16/09/2022 | Sick |
1002 | GEO22 | 16/09/2022 | Present |
1002 | PHY22 | 16/09/2022 | Present |
Student | Total Sick days | Current Sickness Streak |
1001 | 2 | 1 |
1002 | 1 | 0 |
Hi @dejate ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want.
1. Create a measure as below to get Total Sick days:
Total Sick days =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Date] ),
FILTER ( 'Table', 'Table'[Register Mark] = "Sick" )
)
2. Follow the steps below to get Current Sickness Streak
1) Create a calculated column as below to judge if the sickness is steak on one whole day
Flag =
VAR _ccount =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Subject Code] ),
FILTER (
'Table',
'Table'[Student] = EARLIER ( 'Table'[Student] )
&& 'Table'[Date] = EARLIER ( 'Table'[Date] )
)
)
VAR _sickcount =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Subject Code] ),
FILTER (
'Table',
'Table'[Student] = EARLIER ( 'Table'[Student] )
&& 'Table'[Date] = EARLIER ( 'Table'[Date] )
&& 'Table'[Register Mark] = "Sick"
)
)
RETURN
IF ( _ccount = _sickcount, 1, 0 )
2) Create a measure as below to get Current Sickness Streak
Current Sickness Streak =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Date] ),
FILTER ( 'Table', 'Table'[Flag] = 1 )
) + 0
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Thnaks for your reply @Anonymous - Your measure for Total Sick days worked great, thnaks for that.
But the consecutive sick day measure just seems to return a 1 Flag for every day in my data. It maybe my grouping, so still trying to work through this, but thanks for your suggestion.
I'm also working through @amitchandak suggestion from https://youtu.be/GdMcwvdwr0o
Thanks both, Ill post my update
Hi @dejate ,
Thanks for your feedback. So do you get the final solution for your problem now? If yes, could you please mark the helpful post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.
Best Regards
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
11 | |
9 | |
8 | |
8 |