Forum Discussion
aiyosap
Helper II
3 years agoWhile loop in a column..is this possible
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...
- 3 years ago
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())
johnyip
Solution Sage
3 years agoHi 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())
aiyosap
Helper II
3 years agoHi John,
Sorry but would that measure possible in a calculated column?
Regards,
Yong
- johnyip3 years ago
Solution Sage
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())