I've searched high and low for an answer without any luck so I figured i'd see if you guys could help me out.
I'm creating a line chart which I want to use a couple different ways. The first way is sales by day of the month, this would just display days 1-31 on the x axis to show the MTD sales, for an example it would be used to show November 2019 and November 2020 and the user can see how the sales compare as the month goes on.
The second way is to use actual the actual date field in my data which is Entered Date, using this they can select longer date ranges if they want to dig into the date.
My plan was to use the qsVariable extension with a drop down list to change the dimension to either the Day of Month or the Entered Date. However, i have the IF equations below that i've tried and they just don't seem to work. It seems to have trouble giving me the else condition, i can't seem to get the x axis to change with this. It works great if i add these as alternative dimensions, however the goal is to make this easier for the users. Any thoughts as to what might solve this? Is it even possible to switch the x axis with a variable and if equation?
if(MTDChart = 'MTD',[Day of Month],[Entered Date])
if(MTDChart = 'EnteredDate', [Entered Date], if(MTDChart = 'MTD',([Day of Month])))
I've also tried test conditions such as If(Year(Today())= 2020, [Day of Month],[Entered Date]) and that works, i'm thinking it's something with the variables in the dimension but i'm new to this and not sure how else to troubleshoot.