Forum Discussion

matdub40's avatar
matdub40
Icon for Helper III rankHelper III
5 years ago
Solved

The "SAMEPERIODLASTYEAR" function expects a contiguous selection

I have a measure "Evo%" that allows me to calculate the percentage change in sales between years, the formula is:   Evo %:= DIVIDE ( [Euro Gross Amount] - CALCULATE ( [Euro Gross Amount], SAMEP...
  • goncalogeraldes's avatar
    5 years ago

    I think that the error is due to the nature of the relationship between your date table and dwh_d_order_sku table being set to bidirectional. Try switching it to single direction from the date table to the dwh_d_order_sku table, that is, from the one to the many side! 

     

     

     

    (please note that in this image the cardinality is many to many which is not your case, therefore just focus on the cross filter direction)

     

    Hope this answer solves your problem! If you need any additional help please tag me in your reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️ or give it a kudoe 👍
    Thanks!

    Best regards,
    Gonçalo Geraldes