简体   繁体   中英

Repeated running count of column based on date - Tableau

Hi I want to know the index of the purchase number of a client based on the purchasing date.

Starting table

So I want to count the purchases made by each person and numbering them by date. The new row will be:

Final table

Any idea? Thanks!

Quickest way is to create a Calculated Field called "One" with the value of 1. Then put it on the Text Mark Card, add a Table Calculation. Specify "specific dimensions" so you can choose the value of "Client" in the 'restarting every' column. See the picture below.

Table calcs are dependent on the order of the data. If you want the numbering to be completely independent of the visual representation than you would be best served by using Tableau Prep which can add the field to your data source.

Tableau表计算

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM