Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

undefined

Hi , I have a month slicer , I have a bar graph which shows values like completed in progress etc. my requirment is if I sect a month is Slicer like March 2020. I shoud get bar graph which shows ...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous ,

     

    Please check the following steps.

    1# Create a calendar table and a calculated calculated column "yearmonth" as slicer.

     

    CALENDAR = CALENDAR(MIN('Table'[date]),MAX('Table'[date]))
    
    yearmonth = FORMAT('CALENDAR'[Date],"YYYYMM")

     

    2# Create two measures one for current month visual, another for previous visual.

     

    Measure = IF(FORMAT(SELECTEDVALUE('Table'[date]),"YYYYMM")=SELECTEDVALUE('CALENDAR'[yearmonth]),1,0)
    
    Measure 2 = IF(format(EDATE(SELECTEDVALUE('Table'[date]),1),"YYYYMM")=SELECTEDVALUE('CALENDAR'[yearmonth]),1,0)

     

    3# Add measure to visaual level filter. Result would be shown as below.

     

    Best Regards,

    Jay

     

    Community Support Team _ Jay Wang

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