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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

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 @Anonymous ,

 

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.
Anonymous
Not applicable

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

Hi @Anonymous ,

 

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.