Forum Discussion

StevenT's avatar
StevenT
Helper V
1 year ago
Solved

Using drop down to change date settings in chart

Hi, I have two charts. The y-axis contains numerical values, and x-axis is a date hierarchy that contains the following from my calendar table Each one of these fields in the hierarchy are dat...
  • audreygerred's avatar
    1 year ago

    Hi! When you create the below did you use the New parameter then fields from the Modeling ribbon or did you just type this directly in a new table? 

    i tried it by using this code and then putting the first parameter in a drop down to choose, but my code is being ignored.

    _X-Axis =
     //used only in the Calendar Drop down
     {
        ("Annually"NAMEOF('Calendar'[Start of Year]), 0),
        ("Monthly"NAMEOF('Calendar'[Start of Month]), 1),
        ("Quarterly"NAMEOF('Calendar'[Start of Quarter]), 2)
    }
  • StevenT's avatar
    StevenT
    1 year ago

    No, I just created it without adding any parameters against it.  I'll give it a try.

     

  • StevenT's avatar
    StevenT
    1 year ago

    Audrey, thanks so much! The key was creating it with the field parameter.  I tried importing the code from another app, and simply pasting it, changing the field names.  I forgot that this was created with field parameters

  • audreygerred's avatar
    audreygerred
    1 year ago

    You are very welcome! Happy I could help (guess how I suspected you pasted the code... been there done that 😂). Have a great weekend!