Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Open view in current month

Hello, I have a few dashboards setup with BciCalendar as below. When we open the page to view the info I want it to always show the current month on that visual whilst allowing the person navigating to view historical data (May 2018 is the oldest data in the dataset).

 

is that possible?

 

  • Hi Anonymous ,

     

    We can create a measure and use it in visual filter to meet your requiremen:

     

    Current Month Show Control =
    IF (
        CALCULATE ( COUNTROWS ( 'Calendar' ), ALL ( 'Calendar' ) )
            = CALCULATE ( COUNTROWS ( 'Calendar' ), ALLSELECTED ( 'Calendar' ) ),
        IF (
            YEAR ( TODAY () ) = YEAR ( MIN ( 'Calendar'[Date] ) )
                && MONTH ( TODAY () ) = MONTH ( MIN ( 'Calendar'[Date] ) ),
            1,
            -1
        ),
        1
    )
    

     


    Best regards,

     

2 Replies

  • v-lid-msft's avatar
    v-lid-msft
    Community Support

    Hi Anonymous ,

     

    We can create a measure and use it in visual filter to meet your requiremen:

     

    Current Month Show Control =
    IF (
        CALCULATE ( COUNTROWS ( 'Calendar' ), ALL ( 'Calendar' ) )
            = CALCULATE ( COUNTROWS ( 'Calendar' ), ALLSELECTED ( 'Calendar' ) ),
        IF (
            YEAR ( TODAY () ) = YEAR ( MIN ( 'Calendar'[Date] ) )
                && MONTH ( TODAY () ) = MONTH ( MIN ( 'Calendar'[Date] ) ),
            1,
            -1
        ),
        1
    )
    

     


    Best regards,

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you so much v-lid-msft this is amazing.