I want to have measures which would show the sum sales of current month and a month before.
For example, Jan 2018 Sales = 1M, Feb 2018 Sales = 2M, Mar 2018 Sales = 3M
When I drag date dimension month to roll and sales to measure, the result would be
But I want to have the new calculated measure call "Sales of current and previous month." which I want it to show following result
Use the below calculation :
if FIRST() = 0 then SUM([Sales]) else
Hope it helps!!
Become a Viz Whiz on the Forums!
Support the Community and master Tableau.
Retrieving data ...