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

0

Refresh failed after 1st September

Hello there,

 

Starting from 1st September report doesn't refresh with unexpected error.Refresh History.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I figured out that the reason of refresh failing is the same error in the code

 

93 Layout = 
VAR PathItem1 = DISTINCT('Delays All'[Path Item 1])


RETURN

	GENERATE (PathItem1;                  
	    VAR PathItem1_var = [Path Item 1]
	    
	    VAR MaxLength =                  
	       CALCULATE(
	           MAX('Delays All'[Path Length]);
	           FILTER (
	               'Delays All';
	               'Delays All'[Path Item 1] = PathItem1_var
	           )
	       )   
		VAR TablePathLength = GENERATESERIES(1;MaxLength;1)
		
		VAR TableFilteredByPathItem1 = 
             CALCULATETABLE (
                SELECTCOLUMNS ( 'Delays All';
                  "Path Length"; 'Delays All'[Path Length];
                  "Delay_Code";  'Delays All'[DelayCode];
                  "Delay Time"; 'Delays All'[DelayTime];
                  "Delay by Flight ID"; 'Delays All'[Delay by Flight ID];
                  "Difference"; 'Delays All'[Difference]
                );
                FILTER('Delays All'; 'Delays All'[DelayCode] <> "93" || NOT ISBLANK('Delays All'[Difference]));
                'Delays All'[Path Item 1] = PathItem1_var;
                FILTER ('Delays All'; 'Delays All'[Path Length] IN TablePathLength)                               
              )
              
		RETURN		

		GENERATE (TableFilteredByPathItem1;
		    VAR PathIteration = [Path Length]
		    VAR DelayCode = [Delay_Code]
            VAR DelayTime = [Delay Time]
		    VAR DelayByFlightID = [Delay by Flight ID]
		    VAR Difference = [Difference]
		    
		    VAR TablePathIteration =
		    CALCULATETABLE(
              
		      SELECTCOLUMNS(
		      
		       'Delays All';
		       "FlightID"; 'Delays All'[FlightID];		                   		               
		       "DelayTime"; 
		        IF ( MaxLength > 1 ;
				        IF  ( (DelayCode <> "93" && 'Delays All'[Path Length] > PathIteration ) || (DelayCode = "93" && Difference = BLANK() && 'Delays All'[Path Length] > PathIteration) ;
				             DelayTime*
		                     CALCULATE (
		                       PRODUCT ( 'Delays All'[FactorPrevious] );
					           FILTER( ALL('Delays All'); 'Delays All'[Path Length] <= EARLIER('Delays All'[Path Length]) && 'Delays All'[Path Length] > PathIteration);
					           'Delays All'[Path Item 1] = PathItem1_var
                             );
				             IF ( PathIteration > 1;
					             Difference*
                                 CALCULATE (
		                           PRODUCT ( 'Delays All'[FactorPrevious] );
					               FILTER( ALL('Delays All'); 'Delays All'[Path Length] <= EARLIER('Delays All'[Path Length]) && 'Delays All'[Path Length] >= PathIteration);
					               'Delays All'[Path Item 1] = PathItem1_var
                                 )
					         )
				        )
				  )
		       );
		         FILTER ('Delays All'; ('Delays All'[PATH Length] >= PathIteration && 'Delays All'[PATH Length] <= MaxLength));
		         FILTER ('Delays All'; 'Delays All'[DelayCode] = "93");
		         'Delays All'[Path Item 1] = PathItem1_var
		    )
		    
		    
		    		    
    	    RETURN
		    
		    TablePathIteration
		         
		)
	)

Before 11 September the problem was observed only in the Power BI Server and after this date the problem appeared in Power BI Desktop as well - this code executes with the unexpected error.

 

Look forward to your answer. Thanks.

 

 

Status: Delivered
Comments
v-qiuyu-msft
Community Support

Hi @chipus,

 

Please test again to see if the issue persists. If the dataset requires gateway, please update the gateway to the latest version. 

 

Best Regards,
Qiuyun Yu 

chipus
Regular Visitor

Hi Qiuyun,

 

I've tried to test again and the result the same - an unexpected error when executed DAX code (please see code in the first post). I've made test bypassing gateway and using Power BI Desktop (ver. 2.62.5222.601).

 

93 layout error.PNG

v-qiuyu-msft
Community Support

Hi @chipus,

 

For this issue I would suggest you create a support ticket and let Microsoft engineers to look into your environment. 

 

Support Ticket.gif

 

Best Regards,
Qiuyun Yu 

v-qiuyu-msft
Community Support
Status changed to: Delivered