Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
prma7799
Master III
Master III

Manually insert row within table

Dear All,

How to insert calculated expression as dimension.

PFA attachment for qvw file and for expected output

Thanks

1 Solution

Accepted Solutions
tresesco
MVP
MVP

If yes, check this:

Table:

Load *, RowNo() as Sort Inline

[RollNum,salary

180,300000

130,145000

120,110000

170,100000

110,50000

150,20000

140,10000

160,5000

];

Concatenate

Load

  Sort+0.5 as Sort,

  'Diff' as RollNum,

  RangeSum(salary,-Previous(salary)) as salary

Resident Table Order by Sort Desc;

Untitled.png

View solution in original post

4 Replies
tresesco
MVP
MVP

Is back-end solution is an option?

tresesco
MVP
MVP

If yes, check this:

Table:

Load *, RowNo() as Sort Inline

[RollNum,salary

180,300000

130,145000

120,110000

170,100000

110,50000

150,20000

140,10000

160,5000

];

Concatenate

Load

  Sort+0.5 as Sort,

  'Diff' as RollNum,

  RangeSum(salary,-Previous(salary)) as salary

Resident Table Order by Sort Desc;

Untitled.png

prma7799
Master III
Master III
Author

Hi tresesco‌,

How can we do this on front end.

Thanks

tresesco
MVP
MVP

In the front-end, it would be a complex and costly procedure that would probably not be affordable in your real data. However, if you have limited number of rows in data as you have shown, a try can be given. Having said that, I strongly suggest to take this into the script as I shown above unless there is a very good reason that you can't go for script solution.