Forum Discussion
SummarizeColumns with Calculatedtable is not working as expected
All of your solutions work, but my concern is the function that I shared with Summarizecolumns used to filter the data but its not filtering the data.
Would like to know if there is any issue with Summarizecolumns and calculatetable, as it worked before.
- Bibiano_Geraldo1 year agoSuper User
Hi GreeshmaN ,
The issue seems to be related to how SUMMARIZECOLUMNS and CALCULATETABLE interact. While SUMMARIZECOLUMNS creates a summarized table, VALUES returns distinct values, and they may behave differently in certain contexts. The problem might stem from changes in the data model or filters not being applied correctly. If the filter 'dim_mas_prd'[mas_prd_id] = "value" isn’t working, it can prevent SUMMARIZECOLUMNS from filtering the data. To diagnose the issue, try testing the filter alone with CALCULATETABLE without SUMMARIZECOLUMNS to see if it works:
CALCULATETABLE( 'fact_A', 'dim_mas_prd'[mas_prd_id] = "value" )If this works, the issue might lie in the way SUMMARIZECOLUMNS is interacting with the filter. Check if there are any changes in your data model or relationships that could affect the filter.
- GreeshmaN1 year agoAdvocate I
For the below one: CALCULATETABLE( 'fact_A', 'dim_mas_prd'[mas_prd_id] = "value" ) I am getting an error message: Query (9, 5) A single value for column 'prd_id' in table 'fact_A' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.- Bibiano_Geraldo1 year agoSuper User
Hi GreeshmaN ,
Try Using FILTER Instead of Direct Condition in CALCULATETABLE:CALCULATETABLE ( SUMMARIZECOLUMNS ( 'fact_A'[prd_id] ), FILTER ( ALL ( 'dim_mas_prd' ), 'dim_mas_prd'[mas_prd_id] = "value" ) )