Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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.

now using that slicer i want the other graphs to change.

my matrix and the two bar graphs should display the current month data if i click in a month on a slicer.https://drive.google.com/file/d/1SR2BgYU1hoV3Dfupk1e4lUdlG2tsAigr/view?usp=sharing 

1 ACCEPTED SOLUTION

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:

Screenshot 2020-09-22 172659.png

For the related .pbix file,pls see attached.

 

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

View solution in original post

5 REPLIES 5
v-kelly-msft
Community Support
Community Support

Hi  @Anonymous ,

 

Modify your measure as below:

M HIT = CALCULATE (COUNT ( Query1[Priority] ),FILTER (Query1,Query1[SLA Status] = "FULFILLED"&& Query1[Exempted SLA] = "N"&&MONTH('Query1'[Call Closed])=SELECTEDVALUE('Table'[Month])))

+ CALCULATE(COUNT( Query1[Priority] ),FILTER(Query1,Query1 [SLA Status] = "EXPIRED" 

&& Query1 [Exempted SLA] = "Y"&&MONTH('Query1'[Call Closed])=SELECTEDVALUE('Table'[Month])))

M. MISS = 
CALCULATE (
    COUNT ( Query1[Priority] ),
    FILTER (
        Query1,
        Query1[SLA Status] = "EXPIRED"
            && Query1[Exempted SLA] = "N"&&MONTH('Query1'[Call Closed])=SELECTEDVALUE('Table'[Month])
    )
)

RAW HIT = CALCULATE (
    COUNT ( Query1[Priority] ),
    FILTER (
        Query1,
        Query1[SLA Status] = "FULFILLED"&&MONTH('Query1'[Call Closed])=SELECTEDVALUE('Table'[Month])
    )
)
RAW MISS = CALCULATE (
    COUNT ( Query1[Priority] ),
    FILTER (
        Query1,
        Query1[SLA Status] = "EXPIRED"&&MONTH('Query1'[Call Closed])=SELECTEDVALUE('Table'[Month])

            
    )
)

And you will see that all the graphs have been changed by the selection of the slicer.

Annotation 2020-09-10 171320.png

Annotation 2020-09-10 171405.png

For the related .pbix file,pls see attached.

 

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

 

 

Anonymous
Not applicable

hiii kelly

 matrix and the other two bar grahs are displaying as per the current month in the slicer but line graph is not displaing the visuals correctly its showing as dots for raw sla% and mit sla%

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:

Screenshot 2020-09-22 172659.png

For the related .pbix file,pls see attached.

 

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

Hiiii

Can someone help to get this work I tried to do in several different ways.but I couldn't make it.i was trying really hard for this.

I have attached my pbix file also.

MFelix
Super User
Super User

Hi @Anonymous ,

 

You are using disconected tables and because of that the information is not updating accordingly what you need to do is the same thing as you did for the line chart however instead of having the filter the information for between the 3 months you need to put it for a single month picking on the RAW SLA% your measure should be similar to:

 

 

RAW_SLA% Month = 
CALCULATE (
    [RAW SLA%];
    FILTER (
        Query1;
        Query1[Call Closed].[MonthNo] = [Selected Slicer]
            
    )
)

 

 

One other option is to create a relation ship between the tables and everything will work properly, you will need to redo your measure for the last 2 months.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.