Forum Discussion

Schwurblini's avatar
Schwurblini
Frequent Visitor
3 years ago

Calculate Value filtered by Slicer Selection

Hi Everyone

 

So i have a bit of an issue to figure this out:

 

I have a slicer with a dropdown menu that allows me to select columns based on if they have a value or if they are "null" or blank:

 thats the corresponding column: 

Affiliate Yes / No = IF('Finished Onboarding'[affiliate] = BLANK() || 'Finished Onboarding'[affiliate] = "null", "No","Yes")
 
Now i have two tables where i track the amount of person who started a registration process and the actual amount of people who finished registration.
 
Every registration has a unique ID and has also the entry of affiliate (On both the started and the finished)
 
I track the percentage of finished registration, problem is, when i filter for affiliate yes / no, it only filters the finished registration, without the onboarding started, which leads to wrong percentage shown for the finished ratio:
the measure of "Percentage finished registrations = CALCULATE(DIVIDE(COUNT('Finished Onboarding'[productMapping]), COUNT(Onboarding[productMapping]))"
 
Now how can i include the registration started affiliate ratio, for example if i select no affiliate, it will count all non affiliate in both tables and divide them, if i select yes, it will divide all fields with affiliate entries in registration finished through all fields with affiliate entries in registration started
 
Much appreciate your input!
 
Best
 
 
 

 

 

 

 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Schwurblini ,

     

    If you want to count without filter, I suggest you to try ALL() function.

    "Percentage finished registrations =
    CALCULATE (
        DIVIDE (
            COUNT ( 'Finished Onboarding'[productMapping] ),
            CALCULATE ( COUNT ( Onboarding[productMapping] ), ALL ( Onboarding ) )
        )
    )

    If this reply still couldn't help you solve your issue, please share a sample file with me and show me a screenshot with the result you want. This will make it easier for us to find the solution.

     

    Best Regards,

    Rico Zhou

     

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

    • Schwurblini's avatar
      Schwurblini
      Frequent Visitor

      Hey Rico

       

      Thanks for the reply, unfortunately it did not solve the issue with the display of numbers. Now i found a workaround. Since i hade a column with affiliate yes / no, i created this measure: 

      Percentage finished registrations affiliate = CALCULATE(DIVIDE(COUNT('Finished Onboarding'[Affiliate Yes / No]), COUNT(Onboarding[Affiliate Yes / No])),'Finished Onboarding'[Affiliate Yes / No] = "Yes", Onboarding[Affiliate Yes / No] = "Yes")
       
      This obiously required me to create two measures instead of one but it does the trick.
       
      I would love to share the sample files but the problem is these are "confidential"
       
      Thank you for your help