Hi guys,
I am having a problem and have tried many ways but still couldn't work it out.
I have two dimensions ,CalMonth and Approved Date, for each CalMonth, I want to calculate how many Materials have the same Approved Date as the CalMonth in all previous Calmonths.
For example, if CalMonth is 201803, then I want to count how many Materials have the Approved Date that is 201803, in this case it's 1.
if Calmonth is 201804, then I want to calculate in CalMonth 201803 and 201804 how many Materials have the Approved Date that is 201804, which should be 2( one in CalMonth 201803 and one in CalMonth 201804).
if Calmonth is 201805, then the answer should be 3, because there is 1 in each CalMonth<=201805.
And hopefully you can help me solve this problem without any filters because I will put the result in the view along with other measures and filters will affect them.
I thought probably I should draw a date range first, for example, if I want to calculate the result in 201901, then I should make tableau calculate all records that have Calmonth<=201901, and then compare all ApprovedDate with 201901 see if they are equal. But I still have no clue how to achieve that. The result should look like the image below with no filters on the fitlers pane and with only CalMonth in the view.
Thanks a lot.
I've attached the workbook.
Message was edited by: Eva Ji Attachment edited
Hi Eva,
How about this?
RUNNING_SUM(COUNT([Approved Date]))
Is this what you're looking for? I've attached a version in 10.4 for you since I believe that's what you supplied. Hope this helps!
Best,
Bryce