Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in BI by (11.1k points)

I had a data structure

Date, Group, Value
1/1/2020, A, 10
2/1/2020, A, 5
3/1/2020, A, 7
1/1/2020, B, 1
2/1/2020, B, 3
3/1/2020, B, 7
1/1/2020, C, 1
2/1/2020, C, 3
3/1/2020, C, 7

I want to create a pie/tree chart that shows the top 5 and remaining as others.I want a slicer which has filter by graph or month

1 Answer

0 votes
by (22.5k points)
edited by

Use the following measure"

[Value % (top N)] = 
var denominator = CALCULATE ( [Value], ALLSELECTED ( Data_table ))
var rank = RANKX ( VALUES ( Data_Table[Group] ), [Value] ))
return IF ( rank <= *N*, DIVIDE ( [Value], denominator ))

And remove the TOP N filter for visualization

 Want to learn more about Power Bi, Refer: power bi tutorial  

Related questions

0 votes
1 answer
asked Jan 5, 2021 in BI by Chris (11.1k points)
0 votes
1 answer
asked Jan 5, 2021 in BI by Chris (11.1k points)
0 votes
1 answer
asked Feb 14, 2021 in BI by Chris (11.1k points)
0 votes
1 answer
asked Mar 4, 2021 in BI by Chris (11.1k points)
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...