Forum Discussion

fullstrum's avatar
fullstrum
Frequent Visitor
4 years ago

Slicer uses different relationship for different visuals

Hello,

 

I have a data structure similar to below:

 

Iteration Table

Iteration

Version1/Sprint172

Version1/Sprint173
Version1/Sprint174
Version1/Sprint175

 

Feature Table

TitleIterationPBIsCompletedInBugsCompletedIn
Test1Version1/Sprint175174175
Test2Version1/Sprint175172172
Test3Version1/Sprint174173172

 

On the feature table, the "PBIsCompletedIn" and "BugsCompletedIn" are the number of the iteration these items were completed. I have an active relationship between Iteration and Feature tables based on the Iteration column.

 

Now, I have one dashboard that I would like to have a slicer at top that allows you to pick an Iteration. Then in one visual, I want to show all the features that have a "PBICompletedIn" number matching the sprint number of the Iteration selected. In the second visual, I want to see all the features with a "BugsCompletedIn" number matching the sprint number of the Iteration selected. I have no idea how to do this. 

 

I will say too, I don't want to remove the active relationship between Iteration and Feature, as I use that relationship for other visuals. 

 

Any ideas?

 

3 Replies

  • AllisonKennedy's avatar
    AllisonKennedy
    Icon for Community Champion rankCommunity Champion

    fullstrum You haven't provided all the info - how do you know which features with a "BugsCompletedIn" number match the sprint number of the Iteration selected? Is there a Bugs column with sprint numbers or another table? 

     

    Once we have all the info we can provide exact measure but you will need to use DAX either USERELATIONSHIP or TREATAS depending on your model view, so if you can share a screenshot of your relationships too that would make things easier.

    • fullstrum's avatar
      fullstrum
      Frequent Visitor

      Hey Allison,

       

      As Requested:

       

       

      Where I would expect the solution to look like:
      When I select Iteration "Version1/Sprint172", the Feature visual would show nothing, the "Feature PBI completed in this iteration" would show Test2, and "Feature Bug Completed In This Iteration" would show Test2 and Test3.

       

       

  • v-chenwuz-msft's avatar
    v-chenwuz-msft
    Icon for Community Support rankCommunity Support

    Hi fullstrum ,

     

    You will need to import the Iteration Table again or duplicate the column, as the original relationship will allow slicer to filter the underlying table. Use the newly imported interation table as the value for the slicer visual.

    Create two measures

    PBIs_measure =
    IF (
        MAX ( [PBIsCompletedIn] )
            = VALUE ( RIGHT ( SELECTEDVALUE ( 'COPY Iteration'[Iteration] ), 3 ) ),
        MAX ( [PBIsCompletedIn] ),
        BLANK ()
    )

     

    Bugs_measure =
    IF (
        MAX ( [BugsCompletedIn] )
            = VALUE ( RIGHT ( SELECTEDVALUE ( 'COPY Iteration'[Iteration] ), 3 ) ),
        MAX ( [BugsCompletedIn] ),
        BLANK ()
    )

     

    And the result:

     

     

    Best Regards

    Community Support Team _ chenwu zhu

     

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