Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

MdxScript(Model) (27, 88) Calculation Error in measure


Hello Community

 

I've been struggling with one such measure.

 

Couldn't load the data for this visual

 

MdxScript(Model) (27, 88) Calculation Error in measure 'Sales Flash'[Total Invoice Amount LY (R)]: Function 'SAMEPERIODLASTYEAR' expects a contiguous select when the date column is not unique, has gaps or it contains time portion.

 

What does this mean in lamens terms? I'm using a tabular model (SSAS) behind this report and it was working prior to this error.

 

Thanks

Martin

 

 

 

  • Anonymous's avatar
    Anonymous
    6 years ago

    The solution to this was that I had a date filter going in both directions from my date table to my date fact table. I changed this to one way.

     

    The reason I had to have a date fact table is because there were multiple companies in my date table with their own fiscal year calendars.

     

    Thanks for your replies, they help me ascertain what the problem was and reconfirmed that I was doing the right thing in regards to the time intelligence piece. Also, note, I had encountered another issue when dealing with tabular modelling when dealing with the date hierarchy's...SSAS passed them through to Power BI as text! 

    https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/33377071-date-with-no-hierarchy-with-ssas-tabular-live-conn

3 Replies