Forum Discussion

TrentS's avatar
TrentS
Helper IV
1 year ago
Solved

Summarize error but no Summarize function

Hi,

Please help me make sense of this error. I cannot share the pbix file. The data source for this is a shared model.
When creating a line chart, with PERIOD as the x-axis (a whole number referencing the months) and Impact Running Total (the measure in question here) as the Y-axis (also formatted as a whole number).
I get the following error:

The issue is there is no SUMMARIZE function in the measure nor a 'Day' column referenced unless it is hidden inside of another function.
If I reduce the DAX in the measure down to just the ROUND function line, it populates the chart without error, just without our preferred view/summation/etc. The two measures in that line also do not have any SUMMARIZE function.

Impact Running Total =

VAR SelectedYear =

    SELECTEDVALUE ( '2FD_Fiscal Calendar'[FISCALYEAR] )

VAR CurrentPeriod =

    SELECTEDVALUE ( '2FD_Fiscal Calendar'[PERIOD] ) -- Max available period in selected year (YTD cutoff)

VAR MaxPeriodInYear =

    CALCULATE (

       MAX ( '2FD_Fiscal Calendar'[PERIOD] ),

        '2FD_Fiscal Calendar'[FISCALYEAR] = SelectedYear

    )

RETURN

    IF (

        NOT ISBLANK ( CurrentPeriod )

           && CurrentPeriod <= MaxPeriodInYear

,

        CALCULATE (

            SUMX(

                FILTER (

                   '2FD_Fiscal Calendar',

                   '2FD_Fiscal Calendar'[FISCALYEAR] = SelectedYear

                       && '2FD_Fiscal Calendar'[PERIOD] <= CurrentPeriod

                )

,

                ROUND ( ( [YTD Pct Sales] - [PYTD Pct Sales] ) * 10000, 0 )

            )

        )

    )

  • Hi Akhil,
    Thanks for the follow up. We actually went another direction with the DAX in this case so it was not the solution in this case. However, I did forward your code on to the team for use in another similar situation.

    We appreciate your work there. Kudos given and thank you!

9 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi TrentS 

    Wanted to circle back one last time to see if everything’s working smoothly with the revised DAX measure using ALL('2FD_Fiscal Calendar'). If it resolved the context issues in your visual, that’s great to hear.

    If the solution worked for you, feel free to mark it as accepted and give it a kudos. it’ll help others in the community who might be facing a similar challenge.

    If you run into anything else down the line or need help refining it further, don’t hesitate to reach out.

    Best regards,
    Akhil.

  • lmolus's avatar
    lmolus
    Advocate II

    Even thougt yuu are not using summarize, the engine might during query evaluation.

     

    It is simple calculation, all yuu need is just simple DAX.

    Your measue in not working because yuu are using wrong approach.

    There is a lot of articles and video's describing how to calculate running total.

     

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi lmolus 
    Thank you for reaching out to the Microsoft Community Forum.


    The column '<oii>Day</oii>' specified in the 'SUMMARIZE' function was not found in the input table.

    You mentioned you're:Not using SUMMARIZE explicitly, using a shared dataset, creating a line chart with PERIOD (x-axis) and a running total measure (y-axis).

    Use this is a semantic model or visual layer error where Power BI's internal engine tries to generate an implicit summarization (often during visual grouping or auto-detection of granularity).
    The error message references HTML-encoded text (<oii>Day</oii>),
    Auto grouping or hierarchy detection is happening in the background (e.g., auto Date hierarchies). The column Day (or a hierarchy level within a hidden or deleted Date field) is referenced in the visual metadata or filters but not accessible in the current model context.

    Disable Auto Date/Time Hierarchies

    Power BI automatically creates hidden Date tables, and visuals may reference a missing "Day" level.

    Fix: Go to File > Options and Settings > Options > Data Load

    Under Time Intelligence, uncheck,  Auto Date/Time for new files, And for current file under "Current File" section, uncheck the same

    Then rebuild the chart using the actual [PERIOD] column instead of any field with a date type unless you intentionally want that.

    Clear the Visual Filters and Rebuild the Chart

    If the visual previously had a hierarchy (like Date > Month > Day), the metadata may still reference a dropped field. To fix this Delete and recreate the visual from scratch

    Add only: PERIOD to the X-axis and [Impact Running Total] to the Y-axis

    Since you're using a shared model, there may be:A field named Day that’s hidden or a calculated table/column that was deleted but still referenced in the visual.

    Impact Running Total = VAR SelectedYear =SELECTEDVALUE ( '2FD_Fiscal  Calendar'[FISCALYEAR] )
    VAR CurrentPeriod = SELECTEDVALUE ( '2FD_Fiscal Calendar'[PERIOD] )

    VAR MaxPeriodInYear = CALCULATE (MAX ( '2FD_Fiscal Calendar'[PERIOD] ), ALL ( '2FD_Fiscal Calendar' ),'2FD_Fiscal Calendar'[FISCALYEAR] = SelectedYear )
    RETURN

    IF (NOT ISBLANK ( CurrentPeriod ) && CurrentPeriod <= MaxPeriodInYear,
    CALCULATE (SUMX (FILTER (ALL ( '2FD_Fiscal Calendar' ),'2FD_Fiscal Calendar'[FISCALYEAR] = SelectedYear &&'2FD_Fiscal Calendar'[PERIOD] <= CurrentPeriod),

    ROUND ( ( [YTD Pct Sales] - [PYTD Pct Sales] ) * 10000, 0 ) )))


    If this response helps, consider marking it as “Accept as solution” and giving a “kudos” to assist other community members.
    Thank you.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi TrentS 

      We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?

      If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

      Regards,

      Akhil.

       

      • TrentS's avatar
        TrentS
        Helper IV

        Hi,

        We have NOT solved this one yet. The AI response was not helpful and so as Imolus alluded to above, we are trying to rewrite the DAX for another method.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  TrentS 

    Just following up to see if the revised DAX measure suggestion helped resolve your issue around the unexpected context behavior in the visual.

    The restructured version using ALL('2FD_Fiscal Calendar') was intended to reset any lingering filters, especially if something like a hidden "Day" column was influencing the result.

    If it worked as expected, please consider marking it as the accepted solution and giving it a kudos, it helps others in the community discover helpful answers more easily.

    And of course, if you're still facing issues or need to tweak it further, feel free to share more context happy to help.

    Best regards,
    Akhil.

  • Hi Akhil,
    Thanks for the follow up. We actually went another direction with the DAX in this case so it was not the solution in this case. However, I did forward your code on to the team for use in another similar situation.

    We appreciate your work there. Kudos given and thank you!

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi TrentS 

    Thanks for the follow-up! Totally understand that you ended up going a different direction with the DAX for this case. Still, I’m glad the solution might be helpful for similar use cases, and appreciate you sharing it with your team.

    If you do end up using any part of the solution elsewhere or if someone from the community finds it useful, feel free to post an update or mark it as accepted, that way others searching for similar scenarios can benefit too.

    Thanks again, and all the best with your work.

    Regards,
    Akhil.