The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
95 | |
93 | |
85 | |
68 | |
65 |
User | Count |
---|---|
241 | |
124 | |
120 | |
81 | |
79 |