Getting Distinct Count of a Value

Gokul Devunuri shared this question 7 months ago
Answered

Hello YF Community,


I'm trying to get a Count of all Distinct values in a single column.


I have 2 Columns in my View - Names and Dates

Some names are associated with multiple dates. So When I drag both the columns into my report, I do see the total number of rows being increased because of this association.


Is it possible to get only the count distinct of names in chart builder ? I have tried the pre defined aggregations in chart builder.

I have attached some screenshots for better understanding. The total distinct count I would like to see is 4114.


Thanks,

Gokul

Comments (3)

photo
1

Hi Gokul,

Thanks for reaching out. This appears to be working as expected. What happens when you click the arrow next to your 'TSOM Server Name' field and click Aggregation > Count Distinct?

/ztt5vmKJZEbAAAAAElFTkSuQmCC

I suspect nothing happens. If this is a separate data entry in your DB, then it is a distinct piece of data, so whether this works depends on the data itself.

If for example, 'amscitrixtest12' is linked to two dates, then when you bring in the date field, it is of course going to be displayed twice - as it is indeed a distinct entry and it's not really a duplicate.

If the issue were that it's appearing twice without the date field brought in with a Count Distinct Aggregation applied then the most likely scenario would be that 'amscitrixtest12' is found in your data twice, but since you're not seeing it twice here and the row number increases when bringing in the date field this all makes sense because you have 'TSOM Server Name' entries linked to multiple dates, so this seems to be expected behavior.

I'm not exactly sure of the requirement here - if you need both the linked dates and the TSOM Server Names there are going to be more rows. There may be some way to draft a calculated field whereby you append additional dates into one date entry, but the exact scripting of such would likely be pretty complicated and regardless, would fall outside the scope of Support.

Hopefully this helps clear this up. Please let me know if you have any other questions or concerns on this.

Regards,

Mike

photo
1

Hello Mike,


Thanks for the clarification. You can close this issue.

photo
1

Hi Gokul,

Thanks for confirming.

Please don't hesitate to reach out with any other questions or concerns.

Regards,

Mike