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
Anonymous
Not applicable

Need Help in writing a measure to calculate total.

Capture.PNG

 

Hi Power BI Community,

 

I need help in writing a measure that will add total for Channel Mix, Customer Mix, Brand Mix, Brand variant Mix, Pack Type

The values are correct but there is an underlying calculation that is making the total as zero.

 

Please help.

 

Thank you in advance.

3 REPLIES 3
v-yetao1-msft
Community Support
Community Support

Hi @Anonymous ,

I am not sure what the effect you need is, or you can provide the result you need .

The total function in Power BI is to sum the value of the specified column. The value in the column has positive and negative numbers, If the number of positive numbers is equal to the number of negative numbers, the result will be zero .

Or you can sum the fields in Visualizations pane.

The effect is as shown:

Ailsa-msft_0-1618881893908.png

Ailsa-msft_1-1618881893913.png

Ailsa-msft_2-1618881893914.png

Best Regards

Community Support Team _ Ailsa Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@v-yetao1-msft Thank you for the response, it is a measure not a column.

Sum of positives are not equal to sum of negatives, the total is being driven by an underlying calculation.

PaulDBrown
Community Champion
Community Champion

@Anonymous 

Try SUMX:

measure total = SUMX(Table, [Channel mix])





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






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.