Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Using Variables in DAX to Limit Visuals

Hello,

 

I'm trying to use a parameter to allow the user to limit the amount of data shown in a visual. I have a Parameter from 1-3 that would allow the user to select the number of months shown. However I seem to be doing something wrong, because the following DAX does not work. In this scenario in the screenshot, I would want data populated in the [_month_check] column where [_Month_Diff] is less than the parameter, but greater than 0.

 

Any tips or recommendations on what I should try to correct this code?

 

1 Reply

  • You declare variables (good) but then don't use them in the rest of the measure (bad).