Forum Discussion

yosemite's avatar
yosemite
Helper III
1 year ago

Creating 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 the same column. 

 

The one highlighted in yellow is coming from AzureData table.

 

I want to create a calculated column in EHR.xlsx. If there is no 099 (regular hours) in the EHR table, it should display as 0. Similarly, if there is no 701, 703 or 705, it should display 0 as well.

 

Is this project doable?

 

Thanks in advance for your help!

 

 

6 Replies

  • Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
    Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
    Please show the expected outcome based on the sample data you provided.

    Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
    Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

  • Anonymous's avatar
    Anonymous
    Not 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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi yosemite,

     

    Just following up to see if the solution provided was helpful in resolving your issue. Please feel free to let us know if you need any further assistance.

    If the response addressed your query, kindly mark it as Accepted Solution and click Yes if you found it helpful — this will benefit others in the community as well.

     

    Best regards,

    Prasanna Kumar

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi yosemite,

     

    Just a gentle reminder — has your issue been resolved? If so, we’d be grateful if you could mark the solution that worked as Accepted Solution, or feel free to share your own if you found a different fix.

    This not only closes the loop on your query but also helps others in the community solve similar issues faster.

    Thank you for your time and feedback!

     

    Best,

    Prasanna Kumar

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi yosemite,

     

    Just a gentle reminder — has your issue been resolved? If so, we’d be grateful if you could mark the solution that worked as Accepted Solution, or feel free to share your own if you found a different fix.

    This not only closes the loop on your query but also helps others in the community solve similar issues faster.

    Thank you for your time and feedback!

     

    Best,

    Prasanna Kumar