简体   繁体   中英

Tableau - Cannot aggregate a list of IDs

I am working with a data set where I'm listing a series of account IDs for a given month / year in my data set. (My month / year are in two different fields - One for year, and one for month. Every row in the data set has a month, year and an account ID listed.)

I can create a table where I can list the account IDs that correspond to each year and month. However, very vexingly, I cannot aggregate these IDs using a Count Distinct operation.

When I try to aggregate "Account ID," the row where I'd expect the aggregated account numbers to display is completely blank. However, if I pull up the raw values, then they populate.

I'm using Tableau Cloud. I'm new to that, but I used Tableau Desktop for many years, and this is the first time I'm encountering this issue.

If it helps, my data is a live SQL query in Snowflake.

Create a date field (calculated field) using your month and year fields

DATE(STR([Month]) + " 1 " + STR([Year]))

It's a way of putting together a string that would look like "Mar 1 2016".

After you do this, if you apply COUNT() on your ID field, you should get the correct level of aggregation.

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