Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
cjbaguley
Frequent Visitor

Published Report showing completely different values for a calculated column than desktop.

Hi Team,

 

Weird one here, I have a calculated that measures the time between an appointment starting and when the user finishes completing notes on that meeting. The formula for the column is:

 

Adjusted Session Summary Completion Time = DATEDIFF('All Coaching Sessions'[Session Start Time] , RELATED('Coach Feedback on Lender'[Adjusted Summary Completion Time]) , MINUTE) / 60
 
In desktop, this reflects correctly and I have verified manually by checking the figures, this is the table view of that output in desktop:
cjbaguley_0-1747280087475.png

 

In the published report however it returns completely, seemingly random numbers in the same table:

 

cjbaguley_1-1747280144109.png

Is it something to do with RELATED not liking the webservice or something?

 

Any guidance would be greatly appreciated.

1 ACCEPTED SOLUTION
v-hashadapu
Community Support
Community Support

Hi @cjbaguley , Thank you for reaching out to the Microsoft Community Forum.

 

In Power BI Desktop, the data model and relationships are loaded in memory and usually behave predictably. But in Power BI Service, things can go wrong due to failed dataset refreshes, inactive or broken relationships or even subtle differences in storage mode. If the related table is empty or if a row-level relationship isn’t resolving properly, RELATED() will quietly return blank and your formula will still execute, just with incorrect assumptions. To fix this, we need to avoid depending solely on RELATED() in a calculated column. Instead, we can use an explicit CALCULATE and FILTER pattern that directly matches rows between the tables.

 

Example:

Adjusted Session Summary Completion Time =

VAR CompletionTime =

    CALCULATE(

        MAX('Coach Feedback on Lender'[Adjusted Summary Completion Time]),

        FILTER(

            'Coach Feedback on Lender',

            'Coach Feedback on Lender'[Session ID] = 'All Coaching Sessions'[Session ID]

        )

    )

RETURN

IF(

    ISBLANK(CompletionTime),

    BLANK(),

    DATEDIFF('All Coaching Sessions'[Session Start Time], CompletionTime, MINUTE) / 60

)

 

Before using it, just double-check that the [Session ID] or equivalent join field exists and is correctly populated in both tables. Also ensure the 'Coach Feedback on Lender' table is fully populated in the Service after refresh.

 

If this helped solve the issue, please consider marking it “Accept as Solution” and giving a ‘Kudos’ so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.

View solution in original post

2 REPLIES 2
cjbaguley
Frequent Visitor

Amazing!!! Thank you so much for your prompt reply, this worked like a charm!!!

 

Really appreciate the "why" of it too, will definitely look out for this in the future.

v-hashadapu
Community Support
Community Support

Hi @cjbaguley , Thank you for reaching out to the Microsoft Community Forum.

 

In Power BI Desktop, the data model and relationships are loaded in memory and usually behave predictably. But in Power BI Service, things can go wrong due to failed dataset refreshes, inactive or broken relationships or even subtle differences in storage mode. If the related table is empty or if a row-level relationship isn’t resolving properly, RELATED() will quietly return blank and your formula will still execute, just with incorrect assumptions. To fix this, we need to avoid depending solely on RELATED() in a calculated column. Instead, we can use an explicit CALCULATE and FILTER pattern that directly matches rows between the tables.

 

Example:

Adjusted Session Summary Completion Time =

VAR CompletionTime =

    CALCULATE(

        MAX('Coach Feedback on Lender'[Adjusted Summary Completion Time]),

        FILTER(

            'Coach Feedback on Lender',

            'Coach Feedback on Lender'[Session ID] = 'All Coaching Sessions'[Session ID]

        )

    )

RETURN

IF(

    ISBLANK(CompletionTime),

    BLANK(),

    DATEDIFF('All Coaching Sessions'[Session Start Time], CompletionTime, MINUTE) / 60

)

 

Before using it, just double-check that the [Session ID] or equivalent join field exists and is correctly populated in both tables. Also ensure the 'Coach Feedback on Lender' table is fully populated in the Service after refresh.

 

If this helped solve the issue, please consider marking it “Accept as Solution” and giving a ‘Kudos’ so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.