I have two tables ( Sales[OrderNumer,Price,ItemId,...] and Item[Id, Name, Type] ) and I have a measure that returns a string like that:
ItemsType1 = CALCULATE(
CONCATENATEX('Sales', RELATED('Item'[Name]), ","), 'Item'[Type] = "type1"
I have a table visual in Power BI Desktop at Order level with the measure ItemsType1 [OrderNumer, ItemsType1]. I want to change BLANK values of ItemType1 column by a default value like "n/a" and I rewrote the measure as:
ItemsType1 = VAR x = CALCULATE(
CONCATENATEX('Sales', RELATED('Item'[Name]), ","), 'Item'[Type] = "type1")
RETURN IF( ISBLANK(x), "n/a", x )
The measure returns the expected value, but in this way, for my 600000 rows in Sales
table, the memory grows abruptly and the visual collapses. I have 16GB of memory. I think the problem is with the IF statement but I do not know why. I would like to understand why this difference in performance and what is the best way to do this.