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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

get a sort value for unlinked records

Hi 

I'm new to Power Bi so sorry inadvance for the possible stupid questions.

I have a database loaded into te model with incidents and a priority level. 
in different tables linked on the priorityid.

When i count the incidents i get somethin like this (fictional numbers)

 

P1  70

P2 400

P3 1000

P4 3000

 400

So the last 400 incidents didn't get a Piriority id does count them as expected.
now i added a value to the priority to sort them (1 - 4) so i can put them in order (the text values contain more data then the P-number)

but the 400 without priority dont get an number.
So i want to mak a column where i put the ordernumber when it exists and the biggest ordernumber +1 when it doesn't exist.
but i can't get it right.

I tried:

PrioritySort = IF ( ISBLANK(Incidents[priorityId]) , max(IncidentPriorities[IncidentPriorityOrder]) +1 , IncidentPriorities[IncidentPriorityOrder])
 
I get a error message that my false clause isn't single value.

how can i solve this?


 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,

 

Thanks for the answers, they didn't really did the trick but they set me on the path to the solution.


This works:

PrioritySort = IF (
ISBLANK ( Incidents[priorityId] ) ,
MAX ( IncidentPriorities[IncidentPriorityOrder] ) + 1 ,
RELATED(IncidentPriorities[IncidentPriorityOrder] )
)

View solution in original post

4 REPLIES 4
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

You may change measure to calculate column:

 

Spoiler
PrioritySort =
IF (
ISBLANK ( Incidents[priorityId] ),
MAX ( IncidentPriorities[IncidentPriorityOrder] ) + 1,
IncidentPriorities[IncidentPriorityOrder]
)

Community Support Team _ Jimmy Tao

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

 

Anonymous
Not applicable

Hi,

 

Thanks for the answers, they didn't really did the trick but they set me on the path to the solution.


This works:

PrioritySort = IF (
ISBLANK ( Incidents[priorityId] ) ,
MAX ( IncidentPriorities[IncidentPriorityOrder] ) + 1 ,
RELATED(IncidentPriorities[IncidentPriorityOrder] )
)
Greg_Deckler
Community Champion
Community Champion

Sample data would help. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

That being said, it looks like you have a measure and so in measures you need to have an aggregator around a column like SUM, MAX, COUNT, etc.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi ,

Here some sample date:

 

20190318.PNG

 

 

 

 

 

 

The first row i want to put 5 in a new column and the other rows shou state the incidentPriorityOrder
so i can sort 1- 5

 

regards

 

Christoph

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors