locked
SummarizeColumns can not have outside filter context RRS feed

  • Question

  • Trying to create a new measure and thought the new SummarizeColumns function may do what I want. But in trying it I get

    MdxScript(Model) (4, 4) Calculation error in measure 'ParticipantMeasure'[avg_of_Achievement_weighted_Rank]: SummarizeColumns can not have outside filter context.

    I'm still pretty new to DAX so my question is how could I know that this function cannot have an outside filter context? It doesn't seem to mention this explicitly in the docs https://msdn.microsoft.com/en-us/library/mt163696.aspx and I wonder if I'm missing some superset thread of knowledge or rule that would have told me that this was the case.

    Further I assume that this means that I cannot use this function inside a measure at all (I guess I can use it in a CalculatedColumn as that only has row context or in an evaluate statement inside dax studio?).

    Thanks for any insights!

    Thursday, November 19, 2015 11:42 AM

Answers

  • I believe that SummarizeColumns was designed to output data for client tools like PowerView and PowerBI. I have not seen any special "thread of knowledge" that would have explained this other than the error message that you got. But in terms of a calculated measure it's probably quite computationally heavy, so maybe that's why it's restricted in this way.

    I think it probably should be possible to get similar output with mixtures of other existing functions, but it depends on what you are doing. Like Greg mentioned, post some sample data and tell us what you are trying to calculate if you want help with building your measure.


    http://darren.gosbell.com - please mark correct answers

    Thursday, November 19, 2015 10:05 PM

All replies

  • Hit us with some sample data and maybe throw the measure you're trying to define at us as well.

    GNet Group BI Consultant

    Thursday, November 19, 2015 3:24 PM
  • I believe that SummarizeColumns was designed to output data for client tools like PowerView and PowerBI. I have not seen any special "thread of knowledge" that would have explained this other than the error message that you got. But in terms of a calculated measure it's probably quite computationally heavy, so maybe that's why it's restricted in this way.

    I think it probably should be possible to get similar output with mixtures of other existing functions, but it depends on what you are doing. Like Greg mentioned, post some sample data and tell us what you are trying to calculate if you want help with building your measure.


    http://darren.gosbell.com - please mark correct answers

    Thursday, November 19, 2015 10:05 PM
  • Thanks Darren, I was just wondering if there was something similar like the X functions all having a particular meaning. I'll post some feedback on msdn.

    I've managed to do what I needed with a summarize.

    Monday, November 23, 2015 1:33 PM