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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Microsoft Employee
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.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
Microsoft Employee
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.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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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