Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

slicer

hiii i am tring to filter my data based on slicer i have a slicer with months if i click on a moth the data in line graph changes and didplay past 2 mnths and present month data which i wanted. no...
  • v-kelly-msft's avatar
    v-kelly-msft
    5 years ago

    Hi  Anonymous ,

     

    Sorry for the late reply!

    Modify your measures for M.SLA%1 and RAW_SLA%1 as below:

    M.SLA% 1 = 
    IF(MONTH(MAX('Query1'[Call Closed])) <= SELECTEDVALUE('Table'[Month])
                && MONTH(MAX('Query1'[Call Closed])) >=SELECTEDVALUE('Table'[Month])-2,
    CALCULATE (
        [M.SLA%],
        FILTER (
            ALL(Query1),
            MONTH('Query1'[Call Closed]) <= SELECTEDVALUE('Table'[Month])
                && MONTH('Query1'[Call Closed]) >=SELECTEDVALUE('Table'[Month])-2
                && Query1[Call Closed].[Year] = YEAR ( TODAY () )
        )
    ),BLANK()
    )
    RAW_SLA% 1 = 
    IF(MONTH(MAX('Query1'[Call Closed])) <= SELECTEDVALUE('Table'[Month])
                && MONTH(MAX('Query1'[Call Closed])) >=SELECTEDVALUE('Table'[Month])-2,
    CALCULATE (
        [RAW SLA%],
        FILTER (
            ALL(Query1),
            MONTH('Query1'[Call Closed]) <= SELECTEDVALUE('Table'[Month])
                && MONTH('Query1'[Call Closed]) >=SELECTEDVALUE('Table'[Month])-2
                && Query1[Call Closed].[Year] = YEAR ( TODAY () )
        )
    ),BLANK())
    

    And you will see:

    For the related .pbix file,pls see attached.

     

    Best Regards,
    Kelly
    Did I answer your question? Mark my post as a solution!