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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
cjbaguley
Helper I
Helper I

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
Helper I
Helper I

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.