Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

total value in table

I've a simple table with whole number values in the last column (no calculation). I would just like to total these values. But I'm ending up with just the value from one row. 

 

I have the following setting: 

 

Data type for the hours per week is a whole number. How can I solve this? Thanks. 

  • Luckily I like skiing in Austria and know a bit of German πŸ˜‰

    Can you share your original dataset that is below this visual? There seems to be something wrong going on there. For example, is "Soll Stunden pro Woche" in the same or related table as your "Beginn der Woche" and "Ende der Woche" columns? If not, that would explain why this is happening as it is just returning the total sum of Soll Stunden of that table, unfiltered by the context of the table visual.

     

    Kind regards

    Djerro123

    -------------------------------

    If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

    Keep those thumbs up coming! πŸ™‚

5 Replies

  • JarroVGIT's avatar
    JarroVGIT
    Resident Rockstar

    I asume this column is not a column but a Measure, is that correct? 
    Measures are evaluated for the total row as well. In the table it is evaluated for every filtered context (by End of Week) but when it is evaluated for the Total row it is evaluated for a context not filtered by End of Week (so the whole dataset). This might give suprising results. 

    If this is a column, then please share your PBIX as I cannot reproduce this behaviour on my machine. If you want, you can PM me the link if you do not want to share publicly here and I can have a look for you.

     

    EDIT: upon looking closer at your second screenshot I do have to conclude this is indeed a column. However, you are showing an extract from Excel, not from PowerBI? Why is that?

     

    Kind regards

    Djerro123

    -------------------------------

    If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

    Keep those thumbs up coming! πŸ™‚

    • Anonymous's avatar
      Anonymous
      Not applicable

      JarroVGIT The content is in a different language.  It is a column(whole number), not a measure. Could I just create a measure to give me the total?

      I tried this but it just gave me the same values: 

      Measure = SUMX('table';table[Soll Stunden pro Woche])
       
      Thanks.

       

      • JarroVGIT's avatar
        JarroVGIT
        Resident Rockstar

        Luckily I like skiing in Austria and know a bit of German πŸ˜‰

        Can you share your original dataset that is below this visual? There seems to be something wrong going on there. For example, is "Soll Stunden pro Woche" in the same or related table as your "Beginn der Woche" and "Ende der Woche" columns? If not, that would explain why this is happening as it is just returning the total sum of Soll Stunden of that table, unfiltered by the context of the table visual.

         

        Kind regards

        Djerro123

        -------------------------------

        If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

        Keep those thumbs up coming! πŸ™‚

  • v-gizhi-msft's avatar
    v-gizhi-msft
    Community Support

    Hi,

     

    According to your description, i am confused about how you calculate this column [Hours per week].

    And if you want to calculate time gap, please try to use DATEDIFF function.

    I create a simple table to test:

    Then, create a calculated column:

    Hours per week = DATEDIFF('Table'[Start Time],'Table'[End Time],HOUR)

    And it shows the correct total:

    Hope this helps.

     

    Best Regards,

    Giotto Zhi