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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
uaTaG87
New Member

CALCULATE(VALUES(*column name*))

Hi everyone,

I am not very expert in DAX language, but I can program. However, I don't find really straight forward some mechanics of the language.
I am struggling to try to understand what this command does. I am working on a decently big project and part of the code was previously made by an expert. I have a measure in this project that needs to calculate some costs. However, my issue is understanding what the command "CALCULATE(VALUES(*Table name[column name]*) returns.

In particular, it is inside a SUMX and the code is this:

SUMX(
*Table name 1*,
[*a measure that returns an integer*]*
CALCULATE( VALUES (*Table name[column name]*))
)

Thank you very much for answering.

1 REPLY 1
FreemanZ
Super User
Super User

hi @uaTaG87 

A one row one column table can be used as single value in DAX. So your code makes sense only when VALUES() returns a single value, as CALCULATE expects a expression returning a single value. Otherwise, it prompts error.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors