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
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
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.

Top Solution Authors