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

Ignore the slicer Item on dax function .

Hi All  ,

 

I have a slicer called Customer type which shows the below options to the users.

  • All
  • Validated
  • Signed up

 

I am trying to create a one Card KPI which should show the values based on the below conditions.

 

  • When user selected the slicer values set to “ALL” I would like to show the Validated value.
  • When user selected wither “validated” or “signed up”, I would like to show the “ALL” value.

 

Ex: Let’s say  I have a values for validated as “10K” and values for ALL as ‘’15K”

 

Now user selected slicer is ALL ..Then the Card KPI value should show “Validated  Members  = 10” and Then user selected slicer set to either validated or signed up then the Card KPI value should show “Total Members = 15K”

 

Please find my workaround for this.

 

I have created a 2 new Mesures (dax Function )

Validated = sum(no_validated)

Singed up  = sum( no_singed up)

Total   = Validated + signed up

 

 

Final Measure for Card KPI

 

Measure = IF (

    SELECTEDVALUE (Table1(Customer_type),

        

    [Total],

    [Validated]

)

 

By using above Dax function I can see the values as excepting but when I select the Signed up as a slicer values “0”

 

Can you please suggest how to achieve this

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: Ignore the slicer Item on dax function .

hi, @Sumanchintala 

You could use ALL , ALLEXCEPT Function in dax formula to ignore the slicer like below:

Measure = 
IF (
    SELECTEDVALUE ( 'Table'[Customer_type] ) = "All",
    CALCULATE (
        SUM ( 'Table'[Value] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Customer_type] = "Validated" )
    ),
    CALCULATE (
        SUM ( 'Table'[Value] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Customer_type] = "All" )
    )
)

Result:

8.JPG9.JPG

here is the sample pbix file, please try it.

 

Best Regards,

Lin

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

View solution in original post

Sumanchintala Regular Visitor
Regular Visitor

Re: Ignore the slicer Item on dax function .

Hi,

 

Thanks for your respones.

 

I achived the above one by using "HASONEVALUE" function.


Ex: IF (HASONEVALUE('Table'[Customer_type] ), [Total_member],[validated_members])

 

its worked me well the way i wanted.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Ignore the slicer Item on dax function .

hi, @Sumanchintala 

You could use ALL , ALLEXCEPT Function in dax formula to ignore the slicer like below:

Measure = 
IF (
    SELECTEDVALUE ( 'Table'[Customer_type] ) = "All",
    CALCULATE (
        SUM ( 'Table'[Value] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Customer_type] = "Validated" )
    ),
    CALCULATE (
        SUM ( 'Table'[Value] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Customer_type] = "All" )
    )
)

Result:

8.JPG9.JPG

here is the sample pbix file, please try it.

 

Best Regards,

Lin

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

View solution in original post

Sumanchintala Regular Visitor
Regular Visitor

Re: Ignore the slicer Item on dax function .

Hi,

 

Thanks for your respones.

 

I achived the above one by using "HASONEVALUE" function.


Ex: IF (HASONEVALUE('Table'[Customer_type] ), [Total_member],[validated_members])

 

its worked me well the way i wanted.

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.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 155 members 1,455 guests
Please welcome our newest community members: