Forum Discussion
LotteLaugesen
Helper V
4 years agoSELECTEDVALUE in calculation not working
Hi I have a filter this filter: and I'm trying to do a calculation depending the selected Item Type Calculation no 1 is working fine and gives me the correct result, but no 2 and 3 are ...
- 4 years ago
Thank you for asking 😊
Because then I came to the thought that I have removed the interaction between the filter and report 🙄 - stupid me and sorry
nandukrishnavs
Community Champion
4 years agoLotteLaugesen Try this
VAR _selectedType =
CALCULATE ( SELECTEDVALUE ( Dim_Items[Item Type] ) )
VAR _result =
CALCULATE (
SUM ( FT_StockTransactionsDetailed[Kg] ),
FILTER ( Dim_Items, Dim_Items[Item Type] = _selectedType )
)
RETURN
_result
LotteLaugesen
Helper V
4 years agoUnfortunately it doesn't help
- nandukrishnavs4 years ago
Community Champion
LotteLaugesen My bad. If there is a relationship between FT_StockTransactionsDetailed and Dim_Items, then you don't need to specify it again in the filter parameter. Can you explain your scenario?
- LotteLaugesen4 years ago
Helper V
Thank you for asking 😊
Because then I came to the thought that I have removed the interaction between the filter and report 🙄 - stupid me and sorry