Forum Discussion

mangaferret's avatar
mangaferret
New Member
3 years ago
Solved

How to filter data based on shared property with other column (PowerBI Newbie!)

Hi All,

 

I have the following formatted data:

 

CodeACodeBNumberSITEPostingValue
600000Customer1JournalNumber1NA1095.30
Customer1 JournalNumber1Sitecode1-182.55
Customer1 JournalNumber1Sitecode1-300.00
Customer1 JournalNumber1Sitecode1-390.00
Customer1 JournalNumber1Sitecode1-213.75
Customer1 JournalNumber1Sitecode1-9.00
600000Customer2JournalNumber2NA1473.18
Customer2 JournalNumber2Sitecode2-245.53
Customer2 JournalNumber2Sitecode2-403.50
Customer2 JournalNumber2Sitecode2-524.55
Customer2 JournalNumber2Sitecode2-287.49
Customer2 JournalNumber2Sitecode2-12.11
600000Customer2JournalNumber3NA1981.43
Customer2 JournalNumber3Sitecode1-330.24
Customer2 JournalNumber3Sitecode1-542.71
Customer2 JournalNumber3Sitecode1-705.52
Customer2 JournalNumber3Sitecode1-386.68
Customer2 JournalNumber3Sitecode1-16.28

 

I have a report that displays the sums of values for each Customer code (in CodeB column) where CodeA = "600000"

 

However, I want to have a slicer so the users can filter the report based on the site codes.

 

The site codes are linked to the 600000 account by either the JournalNumber, or the relation between the CodeA & CodeB columns, but I don't know how to link it.

 

Can anybody help, it would be most appreciated?

Thank you

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi mangaferret 

    Maybe you can use Number as slicer,  then create a measure

    Measure 2 = IF(ISFILTERED('Table (2)'[Number])=FALSE(),1,IF(SELECTEDVALUE('Table (2)'[SITE])<>"NA",1,0))
    Then put the measure to the visual filter, when the measure is "1", it can display

     

    Output

     

    Best Regards,

    Yolo Zhu

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

     

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi mangaferret 

    Maybe you can use Number as slicer,  then create a measure

    Measure 2 = IF(ISFILTERED('Table (2)'[Number])=FALSE(),1,IF(SELECTEDVALUE('Table (2)'[SITE])<>"NA",1,0))
    Then put the measure to the visual filter, when the measure is "1", it can display

     

    Output

     

    Best Regards,

    Yolo Zhu

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