Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Filtering related data

Hey wonderful PBI community

 

I'm trying to look at unique moments and filter related moments on the same id to show how often those related moments occore when selecting an indivual moment. 

 

for example when I click on "Dead Air" I want to see the trend of the "negitive" and "positive sentinment", unfortunatley when you click off the current "Dead Air" selection it clears the top line chart. Ideally I want the top chart to show overall "negitive and positive sentinment", then when you click on "Dead Air" it shows the related occorance of "positive" and "negitive". Maybe there's an easy solution to this I'm not thinking of. 

Here is an example file of the data I'm working with 

"how to get related id's" page is the one in question

pbix file 

 

Thanks in advance, the community has been fantastic for working out pbi problems!

  • Hi Anonymous ,

     

    Try the following formula:

     

    Measure = 
    IF(
        ISFILTERED('Comparison Moment'[Comparison Moment]),
        [match %],
        DIVIDE(
            DISTINCTCOUNT(Main_Data_Set[id]),
            CALCULATE( DISTINCTCOUNT(Main_Data_Set[id]), ALL(Main_Data_Set) )
        )
    )

     

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

    Best Regards,
    Winniz

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

7 Replies

  • v-kkf-msft's avatar
    v-kkf-msft
    Community Support

    Hi Anonymous ,

     

    Try the following formula:

     

    Measure = 
    IF(
        ISFILTERED('Comparison Moment'[Comparison Moment]),
        [match %],
        DIVIDE(
            DISTINCTCOUNT(Main_Data_Set[id]),
            CALCULATE( DISTINCTCOUNT(Main_Data_Set[id]), ALL(Main_Data_Set) )
        )
    )

     

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

    Best Regards,
    Winniz

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

    • Anonymous's avatar
      Anonymous
      Not applicable

      so this doesn't seem to quite work as expected. 

       

      the top graph should be in the 80% range when un-filtered. 

      • v-kkf-msft's avatar
        v-kkf-msft
        Community Support

        Hi Anonymous ,

         

        Try the following formula:

         

        Measure = 
        IF(
            ISFILTERED('Comparison Moment'[Comparison Moment]),
            [match %],
            DIVIDE(
                DISTINCTCOUNT(Main_Data_Set[id]),
                CALCULATE( DISTINCTCOUNT(Main_Data_Set[id]), ALLSELECTED('Main Moment'[Main Moment]), ALL(Main_Data_Set[date]) )
            )
        )

         

         

        If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

         

        Best Regards,
        Winniz

  • Is your default interaction cross filtering or cross highlighting?

    • Anonymous's avatar
      Anonymous
      Not applicable

      filtering, looking to click on one moment, then see those moments and how frequently they show up on the associated id's