Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Thalian
Frequent Visitor

How to get right total?

I have a data like this: 

wrongtotal.PNG

 

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.

 

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
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.Smiley Happy

 

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.Smiley Happy

 

Regards

View solution in original post

3 REPLIES 3
v-ljerr-msft
Employee
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.Smiley Happy

 

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.Smiley Happy

 

Regards

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!

Thiyags
Helper II
Helper II

can you attach the pbix file

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.