Tableau - "Number of Records" not generated
Hello, I am stuck in the lesson Tesla - "Creating Custom fields".
In my Tableau Desktop v.020.20.0415.1946 64-bit, when I generate the data, the field "Number of records" is not automatically generated, as it is shown on videos. On the other hand, I get another field which is not shown on the videos, called "Data (Count)". Unfortunately, the latter cannot be used the same way as you use the Number of records in the next videos.
Could you please provide some instructions on how to create the measure "Number of records", or on how to force Tableau to automatically generate this field.
N.B. To avoid any further mismatch problems like this, it would be nice to have the latest Tableau version used in your videos.
Thank you very much for your assistance.
9 answers ( 0 marked as helpful)
I am also having the same issue. They need to get this sorted
Hi, am having the same issue right now. I've tried to manipulate the data, but couldn't generate the "number of records"
Hello,
I had the same issue this morning because I also have the latest version of Tableau so I checked online. So the Data (count) seems to be the same as the "number of records" but is a non-aggregate argument unlike the number of records. In the calculation field you would have to add "{fixed: " as a prefix to the data (count). Please note that you have to drag and drop the data (count) into the opened dialog box so that you would get the function for the data (count) 《I think it is something like Count ([data]) I am not really sure》.
So it should look like this:
[Price]*{fixed: Count ([data])}
**Please note that I am not sure of the proper arrangement of the function for data (count).
Also in the end you may not need to use it because it looks like the latest version of Tableau already did the multiplication as the value of price ie. calculated the revenue as price.
So if you drag and drop your price into the sheet, you will notice that the figures are the same as the revenue in the video.
Hi, only add a calculation field, name Number of Records, in formula space just harcode the value 1
I also noticed similar problem and think that explanation for "Revenue" calculated field in the video might be incorrect. This is because the Price is different for each row. If the price was same then it would make sense to just multiply the Price with total count for a month to get total revenue. Regardless of this, the calculation somehow appears correctly. This may be due to some other unexplained feature or behavior. Instead of creating a calculated field ("Revenue") and then dragging it over a specific thing the process is actually much simpler. Remove the "Number of Records" or SUM(Revenue) column and ignore whatever is mentioned about these in the video. Instead just drag the Price field next to the Month and it will show you the SUM(Price) which is the Revenue. You can click on this field in the "Marks" pane and in the "Measure" option select Count to display a count instead of SUM. It's this simple. No need to create calculated field.
One simple way to create "Number of records" calculate field is just with 1: Create a calculated filed with '1'
Tableau didn't auto generate it for me when I converted Region to 'States/Province' so I hardcoded it by created a calculated field using COUNT().
you can get the number of records by creating the calculated field by the name of Number of Records and put 1 in the calculation field and apply it and you are good to go
The Number of Records field no longer exists in later versions of Tableau (2020.2 onwards I think). The replacement COUNT(Table) isn't as flexible. However, it's simple to recreate the number of records as it was. Just create a new calculated field with the value 1. Full details on the missing number of records and using the replacement are here.