Forum Discussion

PaulGBG's avatar
PaulGBG
Frequent Visitor
5 years ago
Solved

Date Slicer to Create Variable

Hi,

I am new to Power BI.

I am trying to use a slicer from a date table to create a date as a variable to use in measures.

I need to batch up invoice amounts by 31 day groups from due date and give a sum value as at a specific date.

The date table was created using a CalendarAuto function.

 

I am copying the method used from the following link, Guys and a Cube tutorial.

https://www.youtube.com/watch?v=zhWtU0DynCk

 

 

I get an error when creating the variable, (in the video, he actually uses MIN instead of SELECTEDVALUE, I have tried both.

I have tried having the date table linked to another table, and also not linked (I only want the date as a variable to use in a measure). Any ideas why I cannot get this to work?

 

 

 

  • PaulGBG , Is there anything after the return. Till return, it seems fine. Hope you are creating a measure?

2 Replies

  • PaulGBG , Is there anything after the return. Till return, it seems fine. Hope you are creating a measure?

    • PaulGBG's avatar
      PaulGBG
      Frequent Visitor

      This is as far as I got, even if I leave out RETURN, I still get the syntax error, so I thought that there was some other problem. It is highhlighting an error on the bracket close before RETURN. You think I need to finish the measure?