Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello
Why would you choose CALCULATETABLE over CALCULATE?
I understand the first returns a table and the second a column, but can you describe some situations that the first is better or the only option to calculate something?
Thanks!
Solved! Go to Solution.
i personally mostly use calculate table inside big measure that i need to include VAR with summarize or the x funtions like SUMX , MAXX... and so on or to create virtual relatiosnhips or generate temp table or you wnat to compare measure vs measure in table visual..
for example i need to deeply filter my table before summarizein gso i do
VAR = SUMMARIZE(
CALCULATETABLE(...
or i want my top 10 inside a table
CALCULATETABLE( TOPN( 10, ...)..
while calculate i only use for apllying filter sto my expressions and they dont need deep understanding
more over , CALCULATE modifies a single value (or an aggregate value), whereas CALCULATETABLE returns an entire table.
i personally mostly use calculate table inside big measure that i need to include VAR with summarize or the x funtions like SUMX , MAXX... and so on or to create virtual relatiosnhips or generate temp table or you wnat to compare measure vs measure in table visual..
for example i need to deeply filter my table before summarizein gso i do
VAR = SUMMARIZE(
CALCULATETABLE(...
or i want my top 10 inside a table
CALCULATETABLE( TOPN( 10, ...)..
while calculate i only use for apllying filter sto my expressions and they dont need deep understanding
more over , CALCULATE modifies a single value (or an aggregate value), whereas CALCULATETABLE returns an entire table.
Hi @UsePowerBI
https://www.sqlbi.com/tv/calculate-calculatetable-dax-guide/
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
I don't think it's correct to say CALCULATE evaluates a column.
CALCULATE produces a scalar value. if you project that calculate (using a measure for example) in a table it will "resamble" to a column but it remains a scalar computation executed multiple times in different filter context.
User | Count |
---|---|
98 | |
89 | |
82 | |
71 | |
67 |
User | Count |
---|---|
114 | |
103 | |
100 | |
72 | |
64 |