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
Syndicate_Admin
Administrator
Administrator

Add Column Values of a Calculated Measure

Good afternoon

I need to get the total summation of the values in the column "DIF MAGNITUDE. FROM REG. BELOW 30%", which I obtained by implementing a calculated measure, that measure is represented in a table(Figure 1😞

joseignaciodpb_0-1613059021654.jpeg

Figure 1.

This table is linked to a time segmenter(Figure 2😞

joseignaciodpb_1-1613059021655.png

Figure 2.

As I said before, the formula behind the column "DIF MAGNITUDE. FROM REG. BELOW 30%", is a calculated measure(Figure 3😞

joseignaciodpb_2-1613059021656.png

Figure 3.

If I activate the totals in the table configuration section, I get "0" as a result(Figure 4😞

joseignaciodpb_3-1613059021657.png

Figure 4.

Power BI won't let me perform the SUM function on a calculated measure. Thank you very much in advance for any questions or suggestions you may make about it.

2 REPLIES 2
v-alq-msft
Community Support
Community Support

Hi, @Syndicate_Admin 

 

As is suggested by BA_Pete, you need to add a column on the virtual table and use 'SUMX' function to calculate the sum of the new column.

Measure = 
SUMX(
    SUMMARIZE(
         Table,
         Table[Column],
         ...,
         'New Column',
         [<logic of your measure>]
    ),
    [New Column]
)

 

Best Regards

Allan

 

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

 

Syndicate_Admin
Administrator
Administrator

There @joseignaciodpb ,

This is because the total row on Power BI tables isn't a sum of the column values, it is actually your column measures calculated with no filter on them.

In your scenario, it looks like you would need to create your measures using SUMX i.e. calculate your intermediate measures for each row, then sum the whole lot at the end. This may also require using a virtual table as the table argument in SUMX in order to aggregate values for the SUMX to calculate on.

Without being able to see your data/model structure I can't help you with the actual calculation, but hopefully this gives you are steer as to where to start looking to solve this issue.

Pete

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.