Forum Discussion
Flashed
8 years agoFrequent Visitor
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))
If a calendar table is included, you may use MIN Function, MAX Function and ALLSELECTED Function.
2 Replies
- Phil_Seamark
Microsoft Employee
- v-chuncz-msft
Community Support
If a calendar table is included, you may use MIN Function, MAX Function and ALLSELECTED Function.