Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi everyone,
I have a few reports where we rank top 3 concerns/comments by their negative sentiment score on a bar chart. The issue I am running into is a case where occasionally there is more than 1 item with the same ranking/score, which results in more than 3 items being displayed on the bar chart. I think the best solution might be to return the first item of each rank but I am not sure what the best approach for that is. If someone could help point me in the right direction for addressing this issue (I'm sure it isn't a completely new one, however I wasn't able to find a similar question for it) that would be amazing.
Thank you in advance
IB
FirstForEachRank = CALCULATE(FIRSTNONBLANK(Design[Item],TRUE()),TOPN(1,VALUES(Design[Item]),Design[Value]))
please try this calculated column
Hello @Anonymous,
I am facing a circular dependancy issue when trying to use your calculated column as it conflicts with another one on the table. Is there any way to circumnavigate this or is it possible to write it as a measure to only return True/False?
Rank Column (Cause of conflict):
Rank =
RANKX(
ALLSELECTED('Data'[Department]),
CALCULATE(
SUM( 'Data'[Sentiment Score])
)
)
FirstForEachRank Column:
IsFirstOfRank =
CALCULATE(
FIRSTNONBLANK(
'Data'[Comment],
TRUE()
),
TOPN(
1,
VALUES('Data'[Comment]),
SUM('Data'[IsNegative])
)
)
Error Message:
A circular dependency was detected: Data[Column], Data[Rank], Data[Column].
Kind Regards
IB
FirstForEachRank = CALCULATE(FIRSTNONBLANK(Sheet1[Item],TRUE()),TOPN(1,ALL(Sheet1[Item]),SUM(Sheet1[Value])))
User | Count |
---|---|
47 | |
26 | |
22 | |
17 | |
15 |
User | Count |
---|---|
53 | |
34 | |
17 | |
17 | |
15 |