Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Sudheerk18
Contributor II
Contributor II

How to display only 3 regions out of 5 in a bar chart

Hi All,

Regions - A,B,C,D,E and I want to display only A,B,C regions on X-axis of Bar chart. Tried below formulas but no luck.

1) IF([Region]='A' or [Region]='B' or [C]='C',[Region],null())

2) only({<[Region]={"A","B","C"}>}[Region])

Can someone help please.Thanks in advance.

2 Solutions

Accepted Solutions
albertovarela
Partner - Specialist
Partner - Specialist

You can control that through your measure.

Let's pretend your measure is Sum(Sales) then you can use:

Sum({$<Region={'A','B','C'}>}Sales)

I hope this helps

 

View solution in original post

Sudheerk18
Contributor II
Contributor II
Author

Thanks AlbertoV. Your first solution worked. 🙂

View solution in original post

3 Replies
albertovarela
Partner - Specialist
Partner - Specialist

You can control that through your measure.

Let's pretend your measure is Sum(Sales) then you can use:

Sum({$<Region={'A','B','C'}>}Sales)

I hope this helps

 

albertovarela
Partner - Specialist
Partner - Specialist

Another way would be Aggr(if(match(Region,'A','B','C'),Region,null()),Region) . Just make sure to remove the nulls.

Sudheerk18
Contributor II
Contributor II
Author

Thanks AlbertoV. Your first solution worked. 🙂