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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
hahl
Helper I
Helper I

Measure works in Desktop, but not in the published report

I have a card visual with the measure:

 

AtCapacity = IF(SELECTEDVALUE('PC'[Office])<>BLANK(),
CALCULATE(SUM('T'[AtCapacity])*DISTINCTCOUNT('Date'[Last Day of Work Week]),
FILTER('PCE', 'PCE'[Office]=SELECTEDVALUE('PC'[Office]))),
IF(SELECTEDVALUE('PC'[Region])<>BLANK(),
CALCULATE(SUM('T'[AtCapacity])*DISTINCTCOUNT('Date'[Last Day of Work Week]),
FILTER('PCE', 'PCE'[Region]=SELECTEDVALUE('PC'[Region]))),
SUM('T'[AtCapacity])*DISTINCTCOUNT('Date'[Last Day of Work Week])))
 
I have no issues in the Desktop file with this measure, however when I go to publish it displays as an X and says:
Couldn't load the data for this visual
Couldn't retrieve the data for this visual. Please try again later.

Any ideas how I can trouble-shoot this?
 
Thanks!
1 ACCEPTED SOLUTION

Thank you for the detailed response - it looks like the issue is not with the measure but with my table relationships. 

View solution in original post

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @hahl ,

 

Based on my test, I cannot reproduce your issue here using Power bi desktop version :  2.76.5678.541 64-bit (December 2019). Could you please update your desktop and check agian?

 

Or you can update your measure as below to have a try.

 

AtCapacity =
VAR office =
    SELECTEDVALUE ( 'PC'[Office] )
VAR region =
    SELECTEDVALUE ( 'PC'[Region] )
RETURN
    IF (
        office <> BLANK (),
        CALCULATE (
            SUM ( 'T'[AtCapacity] ) * DISTINCTCOUNT ( 'Date'[Last Day of Work Week] ),
            FILTER ( 'PCE', 'PCE'[Office] = office )
        ),
        IF (
            region <> BLANK (),
            CALCULATE (
                SUM ( 'T'[AtCapacity] ) * DISTINCTCOUNT ( 'Date'[Last Day of Work Week] ),
                FILTER ( 'PCE', 'PCE'[Region] = region )
            ),
            SUM ( 'T'[AtCapacity] ) * DISTINCTCOUNT ( 'Date'[Last Day of Work Week] )
        )
    )

 

If the issue still occur, kindly share your sample data to me to have a test  if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Thank you for the detailed response - it looks like the issue is not with the measure but with my table relationships. 

Hi @hahl ,

 

Has your issue been solved? If so kindly mark my answer as a solution to close the case. Thanks in advance. Any other question, feel free to let me know please.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.