March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have two tables, table 1 is a list of IDs and their details. Table 2 is a list of IDs and their rank. I have a relationship between these two tables based on ID. I want to sort all of the IDs and all of their details by the rank ascending with the nulls at the bottom, currently the nulls are at top by default. The nulls come from IDs in table 1 that are not in table 2. I tried to create a custom column that brings in 2 for all with rank null else 1 and sort by that. This doesn't work however as it is just bringing in nulls still for the custom column where rank is null for IDs in table 1 that are not in table 2.
Any ideas?
Solved! Go to Solution.
I was able to solve this with the following DAX:
RankFromTableA =
IF(
ISBLANK(RELATED('Table A'[Rank])),
MAX('Table A'[Rank]) + 1,
RELATED('Table A'[Rank])
)
I was able to solve this with the following DAX:
RankFromTableA =
IF(
ISBLANK(RELATED('Table A'[Rank])),
MAX('Table A'[Rank]) + 1,
RELATED('Table A'[Rank])
)
We are glad that you have found a solution and are willing to share it, and accept your post for a solution, which is very helpful to our community, and community members who have the same problem as you will find a solution faster.
Thank you for your contribution to the community and wish you all the best in your work.
Best Regards,
Leroy Lu
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |