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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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