Forum Discussion
Anonymous
6 years agoNot applicable
Custom column measures
Hi everyone, I am probably doing something wrong here... I have a table that contains these 5 columns on the left (the picture below). So I've created (with your help) two measures called TimeM and ...
ryan_mayu
6 years agoSuper User
Anonymous
maybe you can try create a new table for this
newtable =
VAR first=SELECTCOLUMNS(FILTER('Table','Table'[step_no]=min('Table'[step_no])),"stop_no",'Table'[step_no],"TimeM",'Table'[timefrom],"DepthM",'Table'[depthfrom])
VAR middle=SELECTCOLUMNS(FILTER('Table','Table'[step_no]>min('Table'[step_no])),"stop_no",'Table'[step_no],"TimeM",MAXX(FILTER('Table','Table'[step_no]=EARLIER('Table'[step_no])-1),'Table'[timeto]),"DepthM",MAXX(FILTER('Table','Table'[step_no]=EARLIER('Table'[step_no])-1),'Table'[depthto]))
VAR last=SELECTCOLUMNS(FILTER('Table','Table'[step_no]=max('Table'[step_no])),"stop_no","","TimeM",'Table'[timeto],"DepthM",'Table'[depthto])
return union(first,middle,last)I only used 10 rows of your sample data
Anonymous
6 years agoNot applicable
ryan_mayu would I be able to plot DepthM vs TimeM then?
I've also run into this:
The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.
- ryan_mayu6 years agoSuper User
Anonymous
Yes, I think so, that was a new table. could you please share more details of plotting depthM and timeM?