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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
chaturchavas
Regular Visitor

Calculating sum of a previously calculated measure

image 8.png

 

Hi, I have created a visual where I use measures. I then want a total of the measure which doesn't come out right. See snapshot attached. Basically having a challenge to get the right grand total for a "calculated measure". The total of the measure is not really sum of this measure, but instead calculated at a row level...sorry if I have made it more convoluted but any help would be appreciated.

1 ACCEPTED SOLUTION

Hi @chaturchavas ,

 

As far as i know, this ’total‘ does not calculate the sum of the measure, if you want to calculate sum of measure, please use

sumx('table',measure)

For example:

Measure = MAX('Table'[Column1])/MAX('Table'[Column2])
Measure 2 = SUMX('Table',[Measure])

1.PNG

 

Best Regards,

Jay

Community Support Team _ Jay Wang

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

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@chaturchavas Not sure what is the logic for your measure but can you please try to use SUMX instead of SUM. If SUMX doesn't work please share the measure logic and some sample data to reproduce the scenario

Hi Vimal,

 

Here is some explanation:

All the columns (Except Material Number) are calculcated measures from the base table. Price Per Unit Difference is difference between the Price Per Unit 2019 and Price Per Unit 2018.

Inflation by Line is another measure  = Price per unit difference * Net Order Qty 2019

So technically I have not used sum or sumx anywhere.
 
My Goal is to get a sum of all "Inflation by Line" , which should be 32,837.9 but the total is coming up -636,436.82
 
I understand that the total is calculating "Total Inflation by line" in the same way as it is doing for each row.
I am just not sure how to create the sum of the inflation by line. My file size is significantly large so not able to upload it (Working on an alternate)
 
Regards,
Amit

Hi @chaturchavas ,

 

As far as i know, this ’total‘ does not calculate the sum of the measure, if you want to calculate sum of measure, please use

sumx('table',measure)

For example:

Measure = MAX('Table'[Column1])/MAX('Table'[Column2])
Measure 2 = SUMX('Table',[Measure])

1.PNG

 

Best Regards,

Jay

Community Support Team _ Jay Wang

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

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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