Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
509 views
in Technique[技术] by (71.8m points)

rolling computation - What is the way of applying operations between rows in tableau?

I have a sales table and I would like to compute percentage of increase in sales between 2 years. I could create the table which includes the sales happed in 2 years but I couldn't find a way to make operations on them. I would like to apply ((sales in 2018)- (sales in 2017))* 100 / (sales in 2017) operation. Is there any way for applying this operation? sales table for years


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

For this type of rolling calculations, tableau offers table calculations. I have prepared a similar cross-tab like yours, and follow like the GIF below

enter image description here

Basically you have have to apply a table calculation on aggregated measure i.e. sum(sales) here by right clicking it and selecting % difference.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...