Forum Discussion
Return first value in given hour range over multiple dates
- Anonymous4 years ago
Hi NewData ,
If you want to chenge the measure to a column, please have a try.
column= var _min=minx(filter(allselected(table),table[model=earlier(table[model])&&((value>=10||value<=15)&&value>=20||value<=25))),table[date]) return if(table[date]=_min,1,0)If I have misunderstood your meaning, please provide the output you want in the form of a picture.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - 4 years ago
Anonymous
I was able to modify your code to get desired solution
column=
var _min1=minx(filter(allselected(table),table[model=earlier(table[model])&&((value>=10&&value<=15))),table[date])
var _min2=minx(filter(allselected(table),table[model=earlier(table[model])&&((value>=20&&value<=25))),table[date])
return
if(table[date]=_min1,1,If(table[date]=_min2,1,
0))
Thank you for assistance.
amitchandak , I was able to get your code to return values for each instance by adding more variables for each measure.
i would like modify this measure to be a column in the table. Any advice on how to make this measure work for NEW COLUMN
Hi NewData ,
If you want to chenge the measure to a column, please have a try.
column=
var _min=minx(filter(allselected(table),table[model=earlier(table[model])&&((value>=10||value<=15)&&value>=20||value<=25))),table[date])
return
if(table[date]=_min,1,0)
If I have misunderstood your meaning, please provide the output you want in the form of a picture.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.