The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi.
I'm using sumarizecolumns in dax studio to summarize three columns from table t1 and a column from related table t2, where the relationship is t1 *----1 t2 (many to one where t2 is on the one side and t1 is on the many). I then add a calculated expression.
So, something like this:
Summarizecolumns(t1[month], t1[segment], t1[region], t2[vp], "Target", max(t1[Amt]) )
I then assign it to a variable and use that variable to sum the calculated expression Target.
This works fine in dax studio, but, in Power BI measure, it gives me
"....SummarizeColumns() and AddMissingItems() May not be used in this context...."
I need to summarize the table to include that field from the related table then I can do the correct calculations.
I can't create a calculated table or even a calculated column because my data is coming from Analysis Services tabular model.
I can't use summarize with addcolumns combination, because summarzie doesn't allow for fields from another table.
Thanks.
Solved! Go to Solution.
It turns out I did have a syntax error indeed where I had an extra "=" sign. The mystry is why did power bi not show a red triangle next to the measure name and didn't give me any indication that the measure had a syntax error until I used it in a visual.
It turns out I did have a syntax error indeed where I had an extra "=" sign. The mystry is why did power bi not show a red triangle next to the measure name and didn't give me any indication that the measure had a syntax error until I used it in a visual.
UPDATE: I used groupby. That remedied the above error. However, I needed to now sum up the above calculated column "Target", since this is really my ultimate goal from this measue, so I did a sumx on the Target field of the table output from groupby.I then got this error on the visula (although the measure didn't seemt ot have errors) : "The measure .... seems to be missing an argument to an arithmetic or to a semantic operator. Please review its expression"