Forum Discussion

Steamedbunz's avatar
Steamedbunz
Frequent Visitor
1 year ago
Solved

Dynamic X axis range based on the current Month

Hi,    I have this Area Chart that tracks Inbox/Outbox email quantities overview. On the Y axis it will be the number of emails. On the X axis it will be days listed for current month.    However...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Steamedbunz ,

     

    Try applying the following measure to a visual filter:

    MEASURE = 
    VAR __today =
        TODAY ()
    VAR __cur_date =
        SELECTEDVALUE ( 'Table'[Date] )
    VAR __wk_monthstart =
        CALCULATE ( MAX ( 'Table'[WK MonthStart] ), 'Table'[Date] = __today )
    VAR __wk_monthend =
        CALCULATE ( MAX ( 'Table'[WK MonthEnd] ), 'Table'[Date] = __today )
    VAR __filter =
        IF ( __cur_date >= __wk_monthstart && __cur_date <= __wk_monthend, 1 )
    RETURN
        __filter

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum