Forum Discussion

SamHE's avatar
SamHE
Regular Visitor
7 months ago
Solved

AX in Power BI Service Model view: editor appends .[Date], causing “The syntax for ‘;’ is incorrect”

In Power BI Service (no Desktop), when I create a calculated column, the editor often auto‑appends .[Date] after my date column reference, turning\ MDR[Planned Submittal Date] into MDR[Planned Submittal Date].[Date].\ This then throws “The syntax for ‘;’ is incorrect.” Removing .[Date] and typing the tail manually fixes it. Looking for a way to prevent the append or disable the behavior in Service.

Environment

  • Power BI Service / Fabric only (no Desktop)
  • Workspace: My workspace
  • Data source: Excel (export from ACC), single table MDR
  • Date columns set to Date in Power Query (web)
  • Model locale: sv‑SE (list separator is semicolon ;)

Goal\ Calculated column for KPI v1 (On‑Time Submission):

OnTime Flag = IF( MDR[Actual submission date] <= MDR[Planned Submittal Date]; 1; 0 )

Problem / Error\ Editor auto‑completes to:

MDR[Planned Submittal Date].[Date]

Then DAX fails with:

The syntax for ‘;’ is incorrect.

Repro steps

  1. Service → Model view → Table MDRNew column
  2. Type/paste: OnTime Flag = IF( MDR[Actual submission date] <= MDR[Planned Submittal Date]; 1; 0 )
  3. Observe the editor append .[Date] and the error line.
  4. Delete .[Date], ensure reference ends at ], then type ; 1 ; 0 ) manually → works.

Workarounds I’ve used (work but clunky)

  • Press Esc when .Date/.Year/.Month suggestions appear; ensure the reference ends on ].
  • Type the last part manually after confirming no .[Date].
  • Use VAR pattern (seems to reduce auto‑insert):
    OnTime Flag =
    VAR Planned = MDR[Planned Submittal Date]
    VAR Actual  = MDR[Actual submission date]
    RETURN IF( Actual <= Planned; 1; 0 )
  • Version that also ignores blank Actual:
    OnTime Flag =
    IF(
        ISBLANK( MDR[Actual submission date] );
        0;
        IF( MDR[Actual submission date] <= MDR[Planned Submittal Date]; 1; 0 )
    )

Questions to the community

  1. Can I disable the .[Date] append (Auto date/time hierarchy) directly in Service for a model created/edited only in the web?
  2. If not, what’s the recommended workaround in Service to avoid .[Date] being injected into column references in calculated columns?
  3. Any editor settings or best practices to stop the auto‑insert while keeping IntelliSense?

Thanks

  • Hi SamHE ,

    Thanks for reaching out to Microsoft Fabric Community.

    Thanks for the detailed repro and for documenting the behavior clearly.

     

    The guidance shared earlier by lbendlin about disabling Auto Date/Time is correct when the model is authored or modified using Power BI Desktop, as that setting is only available there.

    For models created and edited only in Power BI Service, there is currently no editor setting available to stop the auto insert of hierarchy members such as .[Date] while keeping IntelliSense enabled. This behavior is a limitation of the Service DAX editor.

    Auto date/time in Power BI Desktop - Power BI | Microsoft Learn

     

    From a best practices perspective, when authoring models or calculated columns in Service:

    ->Prefer explicit date columns or a dedicated date table rather than relying on implicit date hierarchies

    ->Keep date comparisons simple and explicit to avoid hierarchy member insertion

    ->Use consistent patterns for calculated columns to reduce editor side rewrites

     

    Given this limitation, the workarounds you listed, such as using a VAR based pattern or confirming the column reference ends at ], are the recommended approaches for handling this behavior when authoring calculated columns directly in the Service.

    Thanks for sharing those workarounds along with the repro steps.

     

    Hope this helps. Please reach out for further assistance.
    Thank you.

4 Replies

  • In the options and settings/ options dialog disable the Auto Date/Time setting both for the report and globally.

  • Hi SamHE ,

    Thanks for reaching out to Microsoft Fabric Community.

    Thanks for the detailed repro and for documenting the behavior clearly.

     

    The guidance shared earlier by lbendlin about disabling Auto Date/Time is correct when the model is authored or modified using Power BI Desktop, as that setting is only available there.

    For models created and edited only in Power BI Service, there is currently no editor setting available to stop the auto insert of hierarchy members such as .[Date] while keeping IntelliSense enabled. This behavior is a limitation of the Service DAX editor.

    Auto date/time in Power BI Desktop - Power BI | Microsoft Learn

     

    From a best practices perspective, when authoring models or calculated columns in Service:

    ->Prefer explicit date columns or a dedicated date table rather than relying on implicit date hierarchies

    ->Keep date comparisons simple and explicit to avoid hierarchy member insertion

    ->Use consistent patterns for calculated columns to reduce editor side rewrites

     

    Given this limitation, the workarounds you listed, such as using a VAR based pattern or confirming the column reference ends at ], are the recommended approaches for handling this behavior when authoring calculated columns directly in the Service.

    Thanks for sharing those workarounds along with the repro steps.

     

    Hope this helps. Please reach out for further assistance.
    Thank you.

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

      Hi SamHE ,


      Just wanted to check if the response provided was helpful. If further assistance is needed, please reach out.


      Thank you.

  • Hi SamHE ,

    Just checking in to see if you query is resolved and if any responses were helpful.
    Otherwise, feel free to reach out for further assistance.

     

    Thank you.