Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello
I need your help for a simple issue I cannot solve... I have a table, named TBL below, that contains columns PR, FA and Prio. I need to create a new column RPR with content equivalent to ExpectedPR column below. It gives for set of PR with same FA the one which has lowest Prio
RPR1 below is giving in front of PR the Priority but what I need is PR id whose value is lowest
RPR1 = CALCULATE(
MIN([Prio]),
FILTER(TBL,TBL[FA]=EARLIEST([FA]))
)
I tried several trials using TOPN, FIRSTNONBLANK, CALCULATE, SUMMARIZE,... but I am not able to find the correct formula. Any idea?
Below just to load the example
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCjBU0lFycwSRRkAcYKQUqxMNomCihkiixlhFTcCiIB0g+QBTiKgpXNQIKhoLAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [PR = _t, FA = _t, Prio = _t, ExpectedPR = _t])
in
Source
Thanks for your help!
Solved! Go to Solution.
You can use
Calc PR =
VAR MinPriority = CALCULATE( MIN( 'Query1'[Prio]), ALLEXCEPT(Query1, Query1[FA]) )
VAR Result = CALCULATE( MIN( 'Query1'[PR]), ALLEXCEPT(Query1, Query1[FA]), 'Query1'[Prio] = MinPriority)
RETURN Result
Thanks a lot johnt75, you made my day 😊
You can use
Calc PR =
VAR MinPriority = CALCULATE( MIN( 'Query1'[Prio]), ALLEXCEPT(Query1, Query1[FA]) )
VAR Result = CALCULATE( MIN( 'Query1'[PR]), ALLEXCEPT(Query1, Query1[FA]), 'Query1'[Prio] = MinPriority)
RETURN Result
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
9 | |
8 | |
8 | |
8 |
User | Count |
---|---|
13 | |
12 | |
11 | |
10 | |
9 |