-
1. Re: Calculations on Previous month data
Jim DehnerFeb 19, 2018 8:51 AM (in response to Prajval T)
Good morning
please see the attached
I have 2 solutions for you - one using your original formulas and a second that I modified
first using yours
your goal formula becomes
and it returns this
but I have a question regarding your rate calculation -
usually in calculating rates the measures are aggregated - see below
then the goal formula becomes
now that is going to produce very different results
you know your data and analysis - just looked a little different - you can go either way
Jim
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
-
POC_v10.2.twbx 1.2 MB
-
-
2. Re: Calculations on Previous month data
Prajval T Feb 19, 2018 8:50 PM (in response to Jim Dehner)Thank you JIM for the reply.
I already tried with look up. it will work fine but it will not give any value for first month on the window.
In the above example, it is showing empty. But i need to show the value for July also.
And About Rate calculations, i just gave you an example with sample data. But i am doing summation in actual data.
Can you please help me how to get the data for July month also with same logic(Previous Month Rate * sum(Sales)).
Regards,
Prajwal
-
3. Re: Calculations on Previous month data
Jim DehnerFeb 20, 2018 5:12 AM (in response to Prajval T)
see the attached
the reason that july did not show up is that you had a filter to limit the data to 6 month - Tableau needed the preceding month to make the calculation
(don't worry I'll show you how to get the first month out of the viz)
Start by changing the the formula for the filter as shown below
add the filter to Context (right click the filter and select add to context)
That will get you the viz below with june showing - to hide the first month (it will adjust automatically as you update the viz)
right click the month and select hid - see below
you end up with this
Jim
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
-
POC_v10.2_v10. w july2.twbx 1.2 MB
-