May be you can try this calculation field for x-axis with respect to your selections..
CASE [select measure parameter]
WHEN 1 THEN DATETRUNC("month", [Date]) /* for MTD*/
WHEN 2 THEN DATETRUNC("quarter", [Date]) /* for QTD*/
WHEN 3 THEN DATETRUNC("year", [Date]) /* for YTD*/
Sorry this does not work. I'm going to try another approach.
I was messing around with some parameters and calculated fields with the DATEDIFF() function and got this code working on a sample workbook:
CASE [Choose Sales] // String list parameter with "Current Sales", "QTD", and "YTD".
WHEN "Current Sales" THEN IF (DATEDIFF('month',[Order date],Today())= 0) THEN "Show" END //Shows only this months orders based on today's month.
WHEN "QTD" THEN IF (DATEDIFF('quarter',[Order date],Today())= 0) THEN "Show" END //Shows only this quarters orders based on today's quarter.
WHEN "YTD" THEN IF (DATEDIFF('year',[Order date],Today())= 0) THEN "Show" END //Shows only this years orders based on today's year.
Here's a product help page article explaining the DATEDIFF() function if you have questions about how the function works:
I've attached a sample workbook showing how it works. Let me know if you have any further issues.
QTD and YTD Sample.twbx 1.2 MB
Yes, I have successfully used parameters to distinguish this however all I want to do is based on the parameter (or measure chosen) have the axis that has a date field have the FORMATTING of that date change dynamically.
So if I pick QTD, I only want to see Quarters "Q1" and if I pick Current I only want to see Months "MMM-YY", etc.