Forum Discussion
yosemite
Helper III
1 year agoCreating an ERROR Report from two different servers and database
Hello everyone, Can anyone direct me how to create an error report? Here is the desired result. The one in gray is coming from EHR table. The event types (099, 701, 703, and 705) are in...
Anonymous
1 year agoNot applicable
Hi yosemite ,
Based on your description, you want to create calculated columns for event types that will be used to calculate hours each person spends on different event types each day.
Here is my test for your reference.
Fact table.
Expected output.
The same goes for the other event type calculation columns.
009 Hrs = VAR _hours = CALCULATE(SUM('Table'[HOURS]),'Table'[DATE]=EARLIER('Table (2)'[DATE]),'Table'[EMPLOYEE_ID]=EARLIER('Table (2)'[EMP ID]),'Table'[EVENTTYPE]=009)
RETURN IF(ISBLANK(_hours),0,_hours)701 Hrs = VAR _hours = CALCULATE(SUM('Table'[HOURS]),'Table'[DATE]=EARLIER('Table (2)'[DATE]),'Table'[EMPLOYEE_ID]=EARLIER('Table (2)'[EMP ID]),'Table'[EVENTTYPE]=701)
RETURN IF(ISBLANK(_hours),0,_hours)
——————————————————————————————————————————————————
If my answer helps you solve the problem, please accept my answer as a solution and let it be seen by more people in need.
Best regards,
Mengmeng Li