Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
fullstrum
Frequent Visitor

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 3
v-chenwuz-msft
Community Support
Community 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:

vchenwuzmsft_0-1632121387020.jpeg

 

 

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.

AllisonKennedy
Super User
Super User

@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.


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Hey Allison,

 

As Requested:

fullstrum_0-1632254023331.pngfullstrum_1-1632254047780.pngfullstrum_2-1632254061827.png

 

 

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.

fullstrum_4-1632254242905.png

 

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.