Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
GetFieldSelections(Year) will return a list of years if the user selects more than one, and will return nothing of nothing is selected. This behaviour may be what you want.
An alternative is to use =Max(Year). This will always return exactly one value. If the user selects a year, this will return the selected year. If no selections are made, it will return the latest year in the data set. If the user selects more than one year, then this expression will return the maximum of the selected years. T
Hi, Use this.
=GetFieldSelections(Year)
GetFieldSelections(Year) will return a list of years if the user selects more than one, and will return nothing of nothing is selected. This behaviour may be what you want.
An alternative is to use =Max(Year). This will always return exactly one value. If the user selects a year, this will return the selected year. If no selections are made, it will return the latest year in the data set. If the user selects more than one year, then this expression will return the maximum of the selected years. T
@shiveshsingh Thanks for reply! I tried your solution in my expression but got an error sum({<[Year]={GetFieldSelections(Year)}, [Type]={"*Forecast"}>}[Sales], did I make a mistake here?
Try this
=sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales])
@jonathandienst thanks for the solution, it works for me, cool! thanks so much
top