Forum Discussion

DocDri's avatar
DocDri
Helper I
9 months ago
Solved

Power-BI removes column automatically when saving

Hello,

 

i create a new table using DAX with this query:

 

QG Times Table =
var ppsel =
SELECTCOLUMNS(
FILTER('PP','PP'[EKey]="GG"),
"GKey",'PP'[GKey],
"ValueX",CALCULATE(MAX('XTable'[ValueX]),'XTable'[ExtKey]=EARLIER('PP'[GKey]) && 'PP'[Milestone] = "M1")
)
return ppsel

 

Everything works fine and the table is as I want it. But when I save the file, Power-BI automatically removes the column "ValueX". I don't unerstand why, because power bi managed to create the table before.

 

Do you have any idea? Thanks!

  • Hi all & thanks for your replies! I tried it again, with exactly the same code & it then worked. Seemed to be a temporary problem / bug, which now does not pop up again. 

5 Replies

  • Hi all & thanks for your replies! I tried it again, with exactly the same code & it then worked. Seemed to be a temporary problem / bug, which now does not pop up again. 

    • v-veshwara-msft's avatar
      v-veshwara-msft
      Community Support

      Thanks for the update. Glad to hear it is working now. 

      Please continue using Fabric Community for further queries.

       

      Thanks & Regards.

    • Nabha-Ahmed's avatar
      Nabha-Ahmed
      Super User

      Hi

      glad to hear it’s working now! It might have been a temporary issue in the environment. If it happens again or if you need any further help with the code, feel free to reach out anytime. Thanks for the update!"

  • Hi   DocDri 

    It appears the calculated table you created with the DAX:

     

     
    QG Times Table = VAR ppsel = SELECTCOLUMNS( FILTER('PP','PP'[EKey]="GG"), "GKey",'PP'[GKey], "ValueX",CALCULATE(MAX('XTable'[ValueX]),'XTable'[ExtKey]=EARLIER('PP'[GKey]) && 'PP'[Milestone]="M1") ) RETURN ppsel

    works initially, but when you save the file the "ValueX" column disappears.

    What to check:

    • Ensure that 'XTable'[ValueX] and 'XTable'[ExtKey] have the correct names and data types, and those columns exist at model refresh time. If the referenced column doesn’t exist (or is renamed), Power BI may drop the created column. Microsoft Fabric Community+1

    • Confirm you are not in a mode (e.g., DirectQuery) or have any limitation that prevents materializing calculated tables/columns. Some features aren’t supported in certain storage modes.

    • After editing the DAX, save the file and perform a refresh so the calculated table gets fully processed and stored. If the refresh fails silently or fails to include the column, then the column will appear missing.

    • Consider whether you need to evaluate the logic differently (e.g., EARLIER sometimes needs very careful context). If the filter context results in no rows, the column might exist but be blank or invisible

    •  

    •  

    •  

    DocDri

  • Hi DocDri ,

    Thanks for reaching out to Microsoft Fabric Community.
    Just wanted to check if you had a chance to review the guidance shared by Nabha-Ahmed .

    I tried a similar setup and the column remained after save and refresh, so the behavior might be model-specific. If the issue continues, sharing a small PBIX or sample structure of PP and XTable would help to validate what is happening in your case.

    You may upload the file to a cloud location (for example OneDrive, Dropbox, Google Drive, or WeTransfer) and provide the link in your reply.

    How to provide sample data in the Power BI Forum - Microsoft Fabric Community

     

    Please reach out for further assistance.

    Thank you.