Forum Discussion

Thalian's avatar
Thalian
Frequent Visitor
9 years ago
Solved

How to get right total?

I have a data like this: 

 

alaALM is sum of three values and alakk = alaALM * dckk / dc

dc is distinctcount on slicer selection (there are selected 4 months) and dckk is distinctcount to number of months is apply to row (last row have activity to only 2 months of selected 4)

Problem is that total count calculated like (sum[alaALM]) * dckk / dc but I want it to be like sum(alaALM * dckk / dc). 

 

Does anyone have any clue how I get this? I already tried to study something on differences about sum and sumx but does not have any succes to get a right total count.

 

  • Hi Thalian,

     

    According to your description, using SUMX Function (DAX) should be a possible solution in this case. Here is an good article which explains different scenarios to use SUM vs SUMX in DAX for your reference.:smileyhappy:

     

    If that is not the case, could you post your table structures, the measures you're using with some sample data in this case? It is better to share a sample pbix file. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.:smileyhappy:

     

    Regards

3 Replies

  • v-ljerr-msft's avatar
    v-ljerr-msft
    Microsoft Employee

    Hi Thalian,

     

    According to your description, using SUMX Function (DAX) should be a possible solution in this case. Here is an good article which explains different scenarios to use SUM vs SUMX in DAX for your reference.:smileyhappy:

     

    If that is not the case, could you post your table structures, the measures you're using with some sample data in this case? It is better to share a sample pbix file. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.:smileyhappy:

     

    Regards

    • Thalian's avatar
      Thalian
      Frequent Visitor

      Thanks to that link! I know that I need to do that using sumx but doen't know the right way. Your link was superb!