cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jarodjp42 Regular Visitor
Regular Visitor

Slicer filtering when it shouldn't

I am written the following Dax formula to calculate the average max words each vendor can do. When I put that formula into my visual and use a date slicer it is slicing my target value and max value in the gauge visual. I only want the slicer to filter words in progress. Can someone help explain how I can accomplish this?

 

Formula I'm using to get the average This is the formula I am using to calculate the target & max value in my visual

 

Max words (M) =
VAR Vendor = [Vendor]
RETURN
    DIVIDE (
        DataDump1[Max Words Per (M)],
        CALCULATE (
            COUNTROWS ( DataDump1 ),
            ALL ( DataDump1 ),
            DataDump1[Vendor] = Vendor
        )
    )

 

Capture.JPGCapture1.JPG

 

I want the value to change when I slice the date but want to keep the same value for the target and max value. 

 

Thank you for all your help!

1 ACCEPTED SOLUTION

Accepted Solutions
jarodjp42 Regular Visitor
Regular Visitor

Re: Slicer filtering when it shouldn't

@v-yuta-msft

 

Thank you for responding to me. I was able to get the solution. I created a measure and then reference Max words (M) column. 

 

Formula I used was 

 

Max Words (M) Measure =
CALCULATE (
    SUM ( DataDump1[Max words (M)] ),
    ALLEXCEPT ( DataDump1, DataDump1[Vendor] )
)

 

And the formula I used for my calculated column to get the average of max words was

 

Max words (M) =
VAR Vendor = [Vendor]
RETURN
    DIVIDE (
        DataDump1[Max Words Per (M)],
        CALCULATE (
            COUNTROWS ( DataDump1 ),
            ALL ( DataDump1 ),
            DataDump1[Vendor] = Vendor
        )
    )

 

Thanks for the help and looking into it for me!

 

 

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Slicer filtering when it shouldn't

Hi jarodjp42,

 

Modify your measure like below and check if it can meet your requirement:

Max words (M) =
VAR Vendor = [Vendor]
RETURN
    DIVIDE (
        DataDump1[Max Words Per (M)],
        CALCULATE (
            COUNTROWS ( DataDump1 ),
            ALLSELECTED ( DataDump1 ),
            DataDump1[Vendor] = Vendor
        )
    )

Regards,

Jimmy Tao

jarodjp42 Regular Visitor
Regular Visitor

Re: Slicer filtering when it shouldn't

@v-yuta-msft

 

Thank you for responding to me. I was able to get the solution. I created a measure and then reference Max words (M) column. 

 

Formula I used was 

 

Max Words (M) Measure =
CALCULATE (
    SUM ( DataDump1[Max words (M)] ),
    ALLEXCEPT ( DataDump1, DataDump1[Vendor] )
)

 

And the formula I used for my calculated column to get the average of max words was

 

Max words (M) =
VAR Vendor = [Vendor]
RETURN
    DIVIDE (
        DataDump1[Max Words Per (M)],
        CALCULATE (
            COUNTROWS ( DataDump1 ),
            ALL ( DataDump1 ),
            DataDump1[Vendor] = Vendor
        )
    )

 

Thanks for the help and looking into it for me!

 

 

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 78 members 1,417 guests
Please welcome our newest community members: