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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
soundguy2
Helper I
Helper I

Measure works in Power BI Desktop but not after publishing

I created a DAX measure to show me the total of the most recent day's sales, regardless of filter context.  The measure seems to function correctly in Power BI Desktop, but any visuals using it produce an error message when published to Power BI Service.

 

The measure looks like this.  Is there any reason it would work in Desktop but not on Power BI Service?

 

Latest Sales =
    CALCULATE([Total Sales],
        FILTER(ALL('Calendar'),
            'Calendar'[Date] = MAX('Sales Data'[DateCreated])
        )
    )

1 ACCEPTED SOLUTION

Can you confirm that your Calendar table on the service dataset is contiguous and covering?  You can use DAX Studio with the service dataset as an XMLA endpoint to check that.

View solution in original post

5 REPLIES 5
lbendlin
Super User
Super User

What does the error message say?

All it really says is that 'something's wrong' and points me to the affected measure.  This only happens after it's been published.

measure error.PNG

 

Can you confirm that your Calendar table on the service dataset is contiguous and covering?  You can use DAX Studio with the service dataset as an XMLA endpoint to check that.

It's working!  You're correct that the issue was with the Date (calendar) table.  Thanks for the help.

 

Regards,

Brian

Hi Ibendlin,

 

I think you're on to something with the date table.  The date table is generated from a script, so it's contiguous and covers the range of the data.  However, it's stored as Datetime format and maybe this is conflicting with the server time when published to Power BI Service.  I'll try changing to Date format and I'll post tomorrow whether that fixes the issue.  Thanks for the direction.

 

Brian

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors