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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jtrendl
Helper II
Helper II

How to overcome that you can't add a secondary X axis

Hi there,

 

I have a fact table with employee IDs and their salary data (named SALI Table). One ID can occur multiple times if the employee had multiple raises. 

CIAM IDYear Start Base SalaryCurrent Base Salary
23$800 000$870 630
34$654 654$660 119
25$546$6 011
23$870 630$900 000
34$660 119$700 000

 

I've created a reference table (named UniqueID Table) from this fact table which contains the minimum value of the Year Start Base Salary and the Maximum of the Current Base Salary for each unique ID, and categorized each salary into custom categories based on given criteria:

CIAM IDYear Start Base SalaryCurrent Base SalaryYear Start Base Salary CategoryCurrent Base Salary Category
23$800 000$900 000below 70%below 70%
34$654 654$700 000100-110%120-130%
25$546$6 01170-80%above 150%

 

Now, my issue is, that I need to creat a plot, that shows the number of unique ID-s per custom salary category group (below 70%, 70-80%,...,above 150%) for the Year Start Base Salary Category and the Current Base Salary Category as well.

Something like this:

jtrendl_1-1658137604109.png

In order to make the axis labels in the right order, I needed to create a separate dimension table (named: RSPbins) like this:

jtrendl_2-1658137678180.png

However, I can't connect this dimension table (RSPbins) to both the Year Start Base Salary Category and Current Base Salary Category, because the UniqueID Table should be filterable by the original fact table (SALI Table) and that would create ambiguity between RSPbins and the SALI table (There can be ID-s that should be filtered based on Year Start Base Salary Category but not based on Current Base Salary Category). 

I can't create two separate dimension tables, because Power BI only allows to add a secondary axis to your Y-axis and not to the X-axis.

I hope I managed to explain the situation clearly.

I'm really stuck, any idea is really really appreciated how to overcome this problem.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jtrendl , Make sure you do not have bi-directional join. Then join both columns with same table one join will be inactive, which you can join using userelationship

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

View solution in original post

2 REPLIES 2
jtrendl
Helper II
Helper II

Ahh, this is exactly what I needed, thanks so much!!!!

amitchandak
Super User
Super User

@jtrendl , Make sure you do not have bi-directional join. Then join both columns with same table one join will be inactive, which you can join using userelationship

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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