Forum Discussion

atowriss1's avatar
atowriss1
Advocate I
3 years ago
Solved

Line graph interaction with page filter

Still learning here... I have a line graph that shows for the current year and my page will have a month/year filter.  Currently, when I choose a month, my graph shows that one dot for the month.   ...
  • v-yueyunzh-msft's avatar
    3 years ago

    Hi , atowriss1 

    Here are the steps you can refer to :

    (1)This is my test data :

    (2)We can create a calendar table, we don't need to create relationships between two tables:

    Calendar = ADDCOLUMNS( 
    CALENDAR(FIRSTDATE('Table'[Date]),LASTDATE('Table'[Date])),
    "year_month", year([Date]) * 100 + MONTH([Date])
    )
    
    

    (3)We can create a measure :

    Value = var _slice = MAX('Calendar'[Date])
    var _current= MAX('Table'[Date])
    return 
    IF(_current<= _slice , SUM('Table'[Value]) , BLANK() )

    (4)Then we can put the filed we need  in the visual and then we can meet your need:

     

    Best Regards,

    Aniya Zhang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly