Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi all,
I am wondering if there is a way to perform a looping in my current situation describe below.
I would like the power BI to insert a text called "Biggest" when it looping through and compare the value in each cell in the "Total Onhold Working Days" based on column "Case ID" (see below)
There is a loop and if statement to be embedded in this custom column (Determinant) and I am not sure how to do it.
The table on the left has been accending and descending order like the picture show.
Hope you can shed a light. Thank You
Solved! Go to Solution.
Hi @aiyosap
Please try the following for calculated column:
Calculated Column =
Var CurrentID = [Case ID]
Var MaxValue = MAXX(FILTER(ALL('Table'),[Case ID]=CurrentID),[Total Onhold Working Days])
RETURN
IF('Table'[Total Onhold Working Days]=MaxValue,"biggest",BLANK())
And for measure, it would be like this as follows, copied by my previous answer:
Measure =
Var CurrentID = MAX([Case ID])
Var MaxValue = MAXX(FILTER(ALL('Table'),[Case ID]=CurrentID),[Total Onhold Working Days])
RETURN
IF(MAX('Table'[Total Onhold Working Days])=MaxValue,"biggest",BLANK())
Hi @aiyosap , try to create a measure:
Measure =
Var CurrentID = MAX([Case ID])
Var MaxValue = MAXX(FILTER(ALL('Table'),[Case ID]=CurrentID),[Total Onhold Working Days])
RETURN
IF(MAX('Table'[Total Onhold Working Days])=MaxValue,"biggest",BLANK())
Hi John,
Sorry but would that measure possible in a calculated column?
Regards,
Yong
Hi @aiyosap
Please try the following for calculated column:
Calculated Column =
Var CurrentID = [Case ID]
Var MaxValue = MAXX(FILTER(ALL('Table'),[Case ID]=CurrentID),[Total Onhold Working Days])
RETURN
IF('Table'[Total Onhold Working Days]=MaxValue,"biggest",BLANK())
And for measure, it would be like this as follows, copied by my previous answer:
Measure =
Var CurrentID = MAX([Case ID])
Var MaxValue = MAXX(FILTER(ALL('Table'),[Case ID]=CurrentID),[Total Onhold Working Days])
RETURN
IF(MAX('Table'[Total Onhold Working Days])=MaxValue,"biggest",BLANK())
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 |
---|---|
76 | |
76 | |
57 | |
37 | |
34 |
User | Count |
---|---|
99 | |
56 | |
56 | |
46 | |
40 |