Forum Discussion
How to Create Top Line in Line and Stacked Column
hi all,
kind of stuck here - how I can create a top line that goes across the top of my stacked bars?
sample data
| Date | Business |
| Oct | A |
| Oct | A |
| Oct | B |
| Nov | B |
| Nov | A |
where date is my x axis
count of business is my y-axis
and business is my column legend.
Is this a measure I need for my "Line y-axis" . I have trouble creating it as my "business" column is a string.
5 Replies
- wonka1234Helper III
To update - what worked for me was doing what Greg_Deckler said. But i had to remove my filter then re add it.
- Greg_DecklerCommunity Champion
- wonka1234Helper III
Greg_Deckler when i do that my graph looks like this -
EDIT - Ah i think I have a filter thats causing the above. When i remove it, i get what you get. However I want to keep the filter. Can I exclude the line data from the filter in any way?
- Greg_DecklerCommunity Champion
wonka1234 You could create a measure like: Line Value = COUNTX( ALL( 'Table' ), [Business] )
- AnonymousNot applicable
Hi wonka1234 ,
You can try code as below.
Line Value = COUNTX ( ALLEXCEPT ( 'Table', 'Table'[Date] ), [Business] )Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.