Forum Discussion

Flashed's avatar
Flashed
Frequent Visitor
8 years ago
Solved

Convert 3 months to period

Hello,

 

I've created the following:
This is working pretty well. Only problem is when I select multiple months I receive the error single value expected.

So is there a dax solution to convert the selection to a time period.

 

For example I've selected Jan,Feb,Mar returns = 01012018 .. 31032018

 

Here is my Code.

Huidge Maand =
  VAR Maand = SELECTEDVALUE(Data[MonthNameLong])
  VAR Jaar = SELECTEDVALUE(Data[Year])
  VAR Datum = Maand & "/" & Jaar

return
  if(HASONEVALUE(Data[MonthNameLong]);EOMONTH(Datum;0);EOMONTH(TODAY();-1))