Forum Discussion

AZL's avatar
AZL
Frequent Visitor
6 years ago
Solved

Problem with Applying Slicer/Filter

Hello,    Guys I have the follwoing problems which I hope you will help me solving it.     I want to create a page slicer/filter for Rep. to compare how many products each rep. is handling...
  • v-lili6-msft's avatar
    6 years ago

    hi, AZL 

    You could get it by another way:

    Step1:

    Create a dim Rep table for slicer.

    Step2:

    Create two relationship between dim rep table and basic table by Current rep and New rep column(These two relationship must be inactive)

    Step3:

    Use USERELATIONSHIP Function to create two measure

    Current Plan = CALCULATE(COUNTA('Table'[Product]),USERELATIONSHIP('Dim Rep'[Rep],'Table'[Current]))+0
    New Plan = CALCULATE(COUNTA('Table'[Product]),USERELATIONSHIP('Dim Rep'[Rep],'Table'[New]))+0

    Step4:

    Now, drag Rep field from dim table and two measure into a table visual, and use Rep field from dim table for slicer/filter

    and here is sample pbix, please try it.

     

    Best Regards,

    Lin