Forum Discussion

eagle0473's avatar
eagle0473
New Member
2 years ago

Couldn't load the data for this visual

Hi , 

I have a calculate field in the table "ingaggi "with this formula 

 

DiffDateWinLost =
VAR _ = CALCULATE(MAX(opportunity[NewActualCloseDate]))
RETURN DATEDIFF(Ingaggi[Created].[Date],_,DAY)
 
in desktop powerBi work ,but when I publish on line the report , I receive the error below for the visual object
 

 

Thank 's for help and suggestion

 

2 Replies

  • Hi eagle0473 -Can you cross check the data types are consistent and that the relationships are properly defined. your calculated field should work both in Power BI Desktop and when published online.review the data sources configurations and do the data refresh in desktop and try

     

    also you modify the calculation as like below and check

     

    DiffDateWinLost =
    VAR MaxCloseDate = CALCULATE(MAX(opportunity[NewActualCloseDate]))
    RETURN
    IF(
    NOT(ISBLANK(MaxCloseDate)) && NOT(ISBLANK(Ingaggi[Created].[Date])),
    DATEDIFF(Ingaggi[Created].[Date], MaxCloseDate, DAY),
    BLANK()
    )

     

    Hope it helps

     

    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, eagle0473 

    Ensure that the data source is accessible and properly configured in the online environment. Verify that all necessary relationships between tables are properly defined and available in the online version. Make sure that any calculated columns or measures used in the formula are correctly defined and available in the online dataset.
    Try refreshing the dataset in the Power BI service to make sure all the data is up to date. Also make sure that you have the necessary permissions to access all the data sources and tables referenced in the report

     

    How to Get Your Question Answered Quickly

    Best Regards

    Yongkang Hua

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.