Forum Discussion

beltalowda's avatar
beltalowda
Regular Visitor
4 years ago
Solved

Understanding column in DAX function

Hi all,  I have some problem understanding how powerBI handles columns  I have a large dataset composing of multiple excel files. Each file describing one project. Each file is something like this....
  • AilleryO's avatar
    4 years ago

    Hi,

     

    A calculated column in DAX, is a calculation made row by row within your table and using the Row context of your table (granularity of one row). Knowing this, it is useless (in a calculated column) to specify the value you are using in the calculation, it will be the value of the current calculated row.

    (In theory because using DAX functions you can change the context, but that is another thing).

     

    Whereas when you create a measure there is no calculation made, it will be made directly as you put your measure in a visual (table or chart). So the result will rely on the visual, if you make a table with year you have yearly results, if you make a table with catagory you have results by categories , or by month, project name...

     

    So when you create a measure, as the measure might have to agregate some values (rows), you need to specify how this agregation will be processed (SUM, MAX, MIN, SELECTEDVALUE for the value on the row of your visual...).

    Another way of saying it would be, that measure are taking into account the whole column so you need to specify which value you want in the column.

     

    Hope it makes things more clear, and for the formula thanks to tamerj1 ğŸ™‚