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
Hi Everyone
I have a database named (CUST_DELAY_AND_DOWN_TIME_SUMMARY) that have the following columns in it:
1. (SHIFT_DATE) This is the date.
2. (EQUIP_IDENT) This is the equipment ID.
3. (STATUS_DESC) This is the event description.
Events are loged per equipment, some events are sorted in on shift and counted as a single event. If the event last more than a shift it is loged as a new event with the same description and a consecutive shift date meanig for a day it is 3 events. I need to have this event be counted as one.
If anyone can help me whit this it will be much apriciated.
Solved! Go to Solution.
hii, you can use the below code
Count Unique Events = COUNTROWS( CALCULATETABLE(
CUST_DELAY_AND_DOWN_TIME_SUMMARY, FILTER( ALL(CUST_DELAY_AND_DOWN_TIME_SUMMARY), CUST_DELAY_AND_DOWN_TIME_SUMMARY[EQUIP_IDENT] = EARLIER(CUST_DELAY_AND_DOWN_TIME_SUMMARY[EQUIP_IDENT]) && CUST_DELAY_AND_DOWN_TIME_SUMMARY[STATUS_DESC] = EARLIER(CUST_DELAY_AND_DOWN_TIME_SUMMARY[STATUS_DESC]) ) )
)
hii, you can use the below code
Count Unique Events = COUNTROWS( CALCULATETABLE(
CUST_DELAY_AND_DOWN_TIME_SUMMARY, FILTER( ALL(CUST_DELAY_AND_DOWN_TIME_SUMMARY), CUST_DELAY_AND_DOWN_TIME_SUMMARY[EQUIP_IDENT] = EARLIER(CUST_DELAY_AND_DOWN_TIME_SUMMARY[EQUIP_IDENT]) && CUST_DELAY_AND_DOWN_TIME_SUMMARY[STATUS_DESC] = EARLIER(CUST_DELAY_AND_DOWN_TIME_SUMMARY[STATUS_DESC]) ) )
)
Hi Thanks this works
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 |