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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Guitarseb
Frequent Visitor

Subtotal in a new column instead of a measure

Hello Experts,

I have a table with some years and some value. I want to have the sum of all the value on each rows but using a column instead of a measure. If I use the following same formula on the column and on the masure I don't get the same result when I change the data filter. How do I have to change the formula in order to have the same result I have in the measure?

THis is the formula I used on both column and measure

CALCULATE(sum(Tabella[value]),ALLSELECTED(Tabella))
 
These are the result changing the year filter
table 2.gif

 

table 1.gif

 

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

@Guitarseb , the Column is a calculated column, isn't it? A calculated column is irrelevant to any slicers whereas a measure is so.


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

5 REPLIES 5
wdx223_Daniel
Super User
Super User

@Guitarseb in calculated column, the calculation can not get the value in any slicer.

CNENFRNL
Community Champion
Community Champion

@Guitarseb , the Column is a calculated column, isn't it? A calculated column is irrelevant to any slicers whereas a measure is so.


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Yes it is. Indeed you are right so it is not possible...

camargos88
Community Champion
Community Champion

@Guitarseb,

 

Try:

CALCULATE(sum(Tabella[value]),ALL(Tabella))



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Thanks for your reply

WIth ALL the column has the same behaviour. If i use it on the measure it works like the column giving always the value 3803 even if I change the year filter and this is not what I want

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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