Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago

Calendar table error "multiple values"

Hello 

 

I am having problem with the calendar "A table of multiple values was supplied where a single value was expected.".

 

Calendar = CALENDAR(DATEADD(SaleDetail[Saledate], -5, YEAR), TODAY())

 

 

Can someone help mewith this error? Please don't put a link as I am beginner need to see an example or correct solution. Thank you for understanding.

 

Poco

7 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

    If you want to get data from the past five years up to now, you can use the between slicer. If not, please provide sample data that fully covers your issue and the expected outcome based on the sample data you provided.

     

     

     

     

     

     

     

     

    Best Regards,

    Jayleny

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Anonymous's avatar
    Anonymous
    Not applicable

    with the current date, 5 years a more older, I can upload power bi file pbix

  • HotChilli's avatar
    HotChilli
    Community Champion

    DATEADD returns a table but you want a single date as the first parameter.  Test it by hardcoding a date in there, for example,  DATE ( 2020, 10, 15 )

    If you get that to work, construct the actual date you are trying to get

    • Anonymous's avatar
      Anonymous
      Not applicable

      can you be more specific? an example for "If you get that to work, construct the actual date you are trying to get"? Thank you.

  • Anonymous's avatar
    Anonymous
    Not applicable

    from 01/01/1961 - 08/10/2019 

  • Anonymous's avatar
    Anonymous
    Not applicable

    it should show all cases depend on the date a user choose but those 5 years and more must be applied in every chosen day in a calendar