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.
Hi NewData ,
Please refer to my pbix file to see if it helps you.
Create a measure.
meausre(first value not in range) =
IF (
(
MAX ( 'Table'[value] ) >= 10
&& MAX ( 'Table'[value] ) < 15
)
|| (
MAX ( 'Table'[value] ) >= 20
&& MAX ( 'Table'[value] ) < 25
),
1,
0
)
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.
- NewData4 years agoFrequent Visitor
Anonymous ,
When applying to entire dataset, it would return a 1 on same Model for each date it's in the range. I would like it to only show a "1" when it's the first instance in the range.