Skip to main content

個人名と通勤時間数(単位:hours)の元データがあります。

tableau desktop上で、素直に通勤時間数をそのまま単位hoursで合計表示させたいのですが、なぜかカウント表示になってしまい全て「1」」と表示されてしまいます。

右クリックして、既定のプロパティ→集計→合計と設定しても、カウント表示のままです。

どうすればよいのでしょうか。

ご教示いただけますと幸いです。

 

I have a dataset that includes individual names and commuting hours (unit: hours).

In Tableau Desktop, I’m trying to display the total commuting hours as a sum (in hours), but for some reason, it’s showing up as a count instead — every value is just displayed as “1”.

I tried right-clicking the field and setting Default Properties → Aggregation → Sum, but the values are still shown as a count.

Does anyone know how to resolve this? I’d really appreciate any help or suggestions!

Thanks in advance.

2 answers
  1. May 12, 2025, 4:57 AM

    Hi @恵 安部 ,

     

    It's a bit difficult to tell just from the text descriptions, but I believe the issue might be related to the format of the dataset. If the data contains values like "hours," it's likely that the field is stored as a string, which prevents it from being recognized as a numeric value.

     

    For example: Hi @恵 安部 , It's a bit difficult to tell just from the text descriptions, but I believe the issue might be related to the format of the dataset. 

    You need to create a calculated field that removes the text portion and converts the field into a numeric format. You can use a calculation like:

     

    REGEXP_REPLACE([Hours], 'hours', '')

    image.png 

    Once that's done, you'll be able to aggregate the field using standard aggregation methods.

    image.png 

    However, this is only a guess based on your description. If the issue still persists, it would be greatly appreciated if you could share the TWBX file or a sample dataset.

     

    Hope this helps!

0/9000