Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Line chart range function

I currently have a report that pulls together many line items and orgainzes them by department, report date and hours. When transitioning to a new month I would like a function or measure that would ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

     

    Try adding a Relative date filter to the line chart.

    It will automatically filter the data for this month based on Today() automatically.

     

    Or you want to display all the data, use the auxiliary line to mark the current month's data:

    Please new measures:

    start of the month = EOMONTH(TODAY(),-1) + 1
    end of the month = EOMONTH(TODAY(),0)

    Add Lines:

     

    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

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

     

    Do you want something like this?

    If yes, please try measures like:

    line_1 = 
    CALCULATE (
        [Measure],
        FILTER (
            ALLSELECTED ( 'Calendar' ),
            'Calendar'[Date]
                = EOMONTH ( MAX ( 'Calendar'[Date] ), -1 ) + 1
        )
    )
    line_2 = 
    CALCULATE (
        [Measure],
        FILTER (
            ALLSELECTED ( 'Calendar' ),
            'Calendar'[Date]
                = EOMONTH ( MAX ( 'Calendar'[Date] ), 0 )
        )
    )

    The PBIX file is attached for reference.

     

    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