Skip to main content

Hey everyone! I have a date column that is currently a string as I've used it to store quarter, monthly and yearly dates based on a time frequency column. 

E.g. If Frequency column = monthly, then date values would be 202308. 

If the frequency column = quarterly, then date values would be 2023-Q3

If Frequency column = yearly, then date values would be 2023.

As such, my date column can only be stored as a string and can't be converted to a date type.

 

Now, I need to show the most recent period's transactions and a comparison to the past period as a percentage. E.g. If frequency is monthly, then I need to show current month's total transactions with a %increase/decrease from previous month. End result should look like the picture shown below. How do I show the total sales volume for the most recent month and a comparison to the past month with the percentage calculated? 

I've attached a sample dataset. I put the frequency column in the filters and usually show it as a dropdown to allow users to choose what kind of frequency they want to see the data in. I'm really new to tableau so I'm not sure how to show the most recent month without showing the date and doing a table calculation without the date column showing.

 

Would really appreciate anyone's help!!

3 answers
0/9000