Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
504 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 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...