The expression works fine if I filter by 'Month Year'. However if I try and filter by [Quarter Year] or [Year] the results are incorrect (average salary per month is the project KPI but it would be nice to be able to see the quarter average salary & year average salary).
Then filtering by quarter works but then month doesn't work...The same is true when I replace the date field with [Year] then only the result for year is accurate and the others are not.
Is there a way to adjust the expression to take all three date fields into account? I have a bar graph showing monthly average income but if possible I would like to include alternative dimensions for quarter and year to give the client more options.
Re: If Statement for Salary Average Taking Different date-fields into account
Thank you very much for your support Sunny It is now giving a correct 'QuarterYear' but not month year. I think you have put me on the right track though. the >0 basically means 'the field has been selected' right?
making 'Month Year' the default. I think tried filtering with Quarter year (from a filter pane) and the same for year and it works . But, if don't use the filters and instead just switch to an 'alternative dimension' (month year to quarter year in the bar graph) it doesn't work. Is there something like getselectcount that works when I switch date dimensions in a bar chart?