Forum Discussion
Can I optimize calling same column in different measures?
Hello,
I have a Matrix that is displaying multiple versions of the same column.
- Stock
- Stock vs LY
- Stock vs LY % = DIVIDE(Stock, Stock vs LY) -1
The problem is that displaying Stock is not this fast so calling it three times is too long.
Is it possible to optimize this by creating a measure to retrieve Stock and Stock vs LY to calculate Stock vs LY % (without a server request)?
Or any other way?
Thanks
5 Replies
- amitchandakSuper User
Anonymous , can you share the formula of
- Stock
- Stock vs LY
- AnonymousNot applicable
Stock is a column from my database so I do not think it has a formula
Stock vs LY = CALCULATE( 'Stock'[Stock], SAMEPERIODLASTYEAR( 'Date'[Date] ) )- Greg_DecklerCommunity Champion
Anonymous - Is this a Direct Query situation? If so, you can speed things up and avoid round trips to your database by using Aggregation Tables.
https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-aggregations