Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug DAX Editor #857

Closed
PalombieChamonix opened this issue Mar 21, 2023 · 11 comments
Closed

Bug DAX Editor #857

PalombieChamonix opened this issue Mar 21, 2023 · 11 comments
Assignees
Labels
issue: bug Confirmed as a bug in TE3

Comments

@PalombieChamonix
Copy link

The DAX editor has a strange behevior since the last release, which makes it very frustrating to use !!
2023-03-21_18-14-27

@jbrizido
Copy link

Happens to me too. Although it does not happen in all reports.

@BitwalkerSthlm
Copy link

Me too, although it only happens in proximity to a collapsible section. I hade to revert to 3.4.2 to be able to work.

@mlonsk
Copy link
Collaborator

mlonsk commented Mar 23, 2023

Hi @PalombieChamonix
Are you working in the expression editor or in a DAX Script and does it happen in both?

@mlonsk
Copy link
Collaborator

mlonsk commented Mar 23, 2023

Hi @PalombieChamonix , @jbrizido & @BitwalkerSthlm

I am having a bit of trouble reproducing the issue in the GIF. Would it be possible to share some DAX code as well as a description of each step taken to trigger the bug?
Thank you

@mlonsk mlonsk self-assigned this Mar 23, 2023
@mlonsk mlonsk added issue: awaiting reply More information is needed issue: needs reproducible example Unable to reproduce the issue from the provided description labels Mar 23, 2023
@BitwalkerSthlm
Copy link

BitwalkerSthlm commented Mar 23, 2023

I only use the Expression Editor, so that's where the issue occurred for me. I reverted back to the previous version, so I can't record anything, but for instance, it happened when I positioned the cursor at the start of the row above RETURN, in the measure below, and hit enter.

VAR VAR_MinDate = MIN('DIM Dates'[Day Date])
VAR VAR_MaxDate = MAX('DIM Dates'[Day Date])
VAR VAR_ReEmployLimit = [Re-employment Limit]

VAR VAR_Employees =  
      
    CALCULATETABLE(
        SUMMARIZE(
            FILTER( 'DIM Employment Details',
                
                --Has ended row
                'DIM Employment Details'[Row Valid To] >= VAR_MinDate &&
                'DIM Employment Details'[Row Valid To] <= VAR_MaxDate &&
                
				--Räkna bara de som avslutat en fast anställning
				'DIM Employment Details'[Employment Basic Type] = "Permanent Employment" &&
				
				--Ingen senare fast anställning samma år
				'DIM Employment Details'[E Following Permanent Rows Same Year] = FALSE &&
				
				--Now other employments which interfere
				(
					'DIM Employment Details'[E Has Future Fixed-term Row] = FALSE ||
					'DIM Employment Details'[E Has Future Fixed-term Row] = TRUE && 'DIM Employment Details'[E Gap to Future Fixed-term Row] >= VAR_ReEmployLimit
				) &&
				(
					'DIM Employment Details'[E Has Future Permanent Row] = FALSE ||
					'DIM Employment Details'[E Has Future Permanent Row] = TRUE && 'DIM Employment Details'[E Gap to Future Permanent Row] >= VAR_ReEmployLimit
				)
                
            )
            , 'DIM Employment Details'[Employee Id]
        )
        , TREATAS( VALUES( 'DIM Organization'[Cost Center MDS Code] ), 'DIM Employment Details'[Cost Center MDS Code] )
        , TREATAS( VALUES( 'DIM Employees'[Employee Id] ) ,'DIM Employment Details'[Employee Id])
    )

RETURN
    
    IF(
        ISFILTERED( 'DIM Dates' ) = FALSE,
        
        BLANK(),
        
        CALCULATE( 
            DISTINCTCOUNT('DIM Employees'[Employee Id]), 
            TREATAS( VAR_Employees, 'DIM Employees'[Employee Id] )
        
    )
    )

@otykier
Copy link
Collaborator

otykier commented Mar 24, 2023

Great repro, thanks @BitwalkerSthlm!

@otykier
Copy link
Collaborator

otykier commented Mar 24, 2023

Update: We're working on fixing this issue. In the mean time, you can prevent the issue by disabling "Auto-indent" in the Tools > Preferences > Text Editors > DAX Editor > Auto Formatting page.

image

@mlonsk mlonsk added issue: bug Confirmed as a bug in TE3 and removed issue: awaiting reply More information is needed issue: needs reproducible example Unable to reproduce the issue from the provided description labels Mar 24, 2023
@BitwalkerSthlm
Copy link

Great, thanks!!

@PalombieChamonix
Copy link
Author

PalombieChamonix commented Mar 24, 2023 via email

@otykier
Copy link
Collaborator

otykier commented Mar 28, 2023

This is fixed in 3.5.1. After installing 3.5.1, the issue should no longer appear, even when re-enabling Auto-indent.

@otykier otykier closed this as completed Mar 28, 2023
@CraigsterT
Copy link

CraigsterT commented Mar 29, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Confirmed as a bug in TE3
Development

No branches or pull requests

6 participants