Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I would like to show and compare the % in descending order for current survey and previous survey to make a table visuals, with the top 3 as dark blue and other as blue.(Survey id is smaller means it is earlier date). I have tried to add measure by
Rank = RANKX(CALCULATETABLE(TOP3,ALLEXCEPT(TOP3,TOP3[Survey ID])), TOP3[%],,DESC)
Bar Color = if([Rank(current)] <= 3, "dark blue", "blue")
Below is my sample data.
Survey id | Name | % | Merged(Q&A) | Rank | Date |
ABC123 | A | 50% | Q1_A1 | 1 | 09/09/2022 |
ABC123 | A | 40% | Q1_A2 | 2 | 09/09/2022 |
ABC123 | A | 30% | Q1_A5 | 3 | 09/09/2022 |
ABC123 | A | 1% | Q1_A4 | 5 | 09/09/2022 |
ABC123 | A | 5% | Q1_A6 | 4 | 09/09/2022 |
ABC123 | A | 0% | Q1_A3 | 6 | 09/09/2022 |
ABC234 | A | 50% | Q1_A1 | 1 | 18/09/2022 |
ABC234 | A | 2% | Q1_A2 | 4 | 18/09/2022 |
ABC234 | A | 15% | Q1_A5 | 2 | 18/09/2022 |
ABC234 | A | 1% | Q1_A4 | 5 | 18/09/2022 |
ABC234 | A | 8% | Q1_A6 | 3 | 18/09/2022 |
ABC234 | A | 0% | Q1_A3 | 6 | 18/09/2022 |
ABC345 | B | 20% | Q1_A1 | 3 | 07/09/2022 |
ABC345 | B | 30% | Q1_A2 | 1 | 07/09/2022 |
ABC345 | B | 30% | Q1_A5 | 2 | 07/09/2022 |
ABC345 | B | 1% | Q1_A4 | 5 | 07/09/2022 |
ABC345 | B | 5% | Q1_A6 | 4 | 07/09/2022 |
ABC345 | B | 0% | Q1_A3 | 6 | 07/09/2022 |
ABC456 | B | 10% | Q1_A1 | 2 | 20/09/2022 |
ABC456 | B | 5% | Q1_A2 | 3 | 20/09/2022 |
ABC456 | B | 30% | Q1_A5 | 1 | 20/09/2022 |
ABC456 | B | 1% | Q1_A4 | 5 | 20/09/2022 |
ABC456 | B | 3% | Q1_A6 | 4 | 20/09/2022 |
ABC456 | B | 0% | Q1_A3 | 6 | 20/09/2022 |
Solved! Go to Solution.
Hi @Hayoung ,
Try formula like below:
set_ =
RANKX (
FILTER ( ALL ( TOP3 ), TOP3[Name] = MAX ( TOP3[Name] ) ),
CALCULATE ( SUM ( TOP3[%] ) ),
,
DESC,
SKIP
)
color = IF([set_] in {1,3,4},"blue","light blue")
If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Hayoung ,
Try formula like below:
set_ =
RANKX (
FILTER ( ALL ( TOP3 ), TOP3[Name] = MAX ( TOP3[Name] ) ),
CALCULATE ( SUM ( TOP3[%] ) ),
,
DESC,
SKIP
)
color = IF([set_] in {1,3,4},"blue","light blue")
If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
93 | |
84 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |