Forum Discussion
Column does not exist sometimes
Hi, I don't think taht answers my question. Let me emphasise the key point so its more understandable.
sometimes there may not be any apples sold for instance. Then this pivoted column wouldn't exist. There will not be a column called Apple to begin with if it doesn't exist as a record because no apple was sold.
This is the problem I am trying to solve. My measures involves calculating the sum of apple grapes and orange. but if apples dont exist, the apple column wouldn't exist and my calculated measure would have an error
kitala11 , One solution I was saying is not to unpivot. Just create measure like
Apple = Sumx(filter(Table, Table[fruit] ="Apple"), [Value])
Orange= Sumx(filter(Table, Table[fruit] ="Orange"), [Value])
but this means to much of measures, that is why I suggested to explore calculation groups, if they can help to reduce it