Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi, community!
I have a question abou t behavior of summarizecolumns.
The detail is as follows.
-------------------------------------------------------
<Premise>
Calendar table has only one column named "YeaMonth" with some values as shown below
<My question>
Why below query output different result
1 :
EVALUATE
VAR tbl = SUMMARIZECOLUMNS( Calendar[YearMonth] )
VAR tbl2 = CALCULATETABLE(tbl,Calendar[YearMonth] = 202310)
RETURN tbl2
2
EVALUATE
VAR tbl =
CALCULATETABLE(
SUMMARIZECOLUMNS( Calendar[YearMonth] ),
Calendar[YearMonth] = 202310
)
RETURN
tbl
-------------------------------------------------------
I can understanad latter one in which summarizecolumn is evaluated in context with "YearMonth" column filtered by 202310.
but I'm not sure about former one.
I would appreciate if someone could help me.
Best regards
Solved! Go to Solution.
Hi @taimaizumi ,
summarizecolumn works as groupby function in sql/python/etc.., means it makes unique groupby column and calculate aggregation based on this primary key if you want.
calculatetable in dax, assist to create new pbi calculated table based on already one. For example, you can create calculate table by filtering some column. If you want create a calculated table with uniqpue key and aggregation by this unique key; you should use summarizecolumn.
In the second dax you wrote, you make groupby in summarizesection and also filter out your calendar date by specific value(202310), then create new table. Actually, you can use directly summarizecolumn without calculatetable.
In the first dax you wrote; you did not filter out your tbl table. You made group by in summarization section like second dax, but when you wrote calculatetable function you did not filter out your new tbl table; you filter out independent table ( calendar table). So actually result shows tbl table not tbl 2 , means your calculateble function in the first dax is not properly constructed.
Hi @taimaizumi ,
summarizecolumn works as groupby function in sql/python/etc.., means it makes unique groupby column and calculate aggregation based on this primary key if you want.
calculatetable in dax, assist to create new pbi calculated table based on already one. For example, you can create calculate table by filtering some column. If you want create a calculated table with uniqpue key and aggregation by this unique key; you should use summarizecolumn.
In the second dax you wrote, you make groupby in summarizesection and also filter out your calendar date by specific value(202310), then create new table. Actually, you can use directly summarizecolumn without calculatetable.
In the first dax you wrote; you did not filter out your tbl table. You made group by in summarization section like second dax, but when you wrote calculatetable function you did not filter out your new tbl table; you filter out independent table ( calendar table). So actually result shows tbl table not tbl 2 , means your calculateble function in the first dax is not properly constructed.
Hi, @OguzMavice
Thank you for your kind reply!
I got your point. Maybe my uderstanding about calculatetable was wrong.
Once table is construced and put away into variable, that variable is not expression anymore.
That's why it'll be evaluated again even if it's envoked within calculatetable with some filter applied.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!