Forum Discussion

MyWeeLola's avatar
MyWeeLola
Icon for Helper II rankHelper II
2 years ago
Solved

Using a filter for custom date periods, how I display 2 separate graphs with 2 different time period

Good morning   I have a code that utilizes 'addcolumns' to create custom time periods in an easily accessible way and is accessed using a slicer.   An example of the code is displayed at the end ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    HI MyWeeLola,

    In fact, you not need to create a new table. The switch function are used to confirm the period duration which will be used in the calculate expressions. 

    For example:

    The MTD the period duration is month, the YTD is year, QTD is quarter.

    For above scenario, you can add a variable with switch function to convert them to days, then you can use this as condition in expressions.

    Regards,

    Xiaoxin Sheng