Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
Solved! Go to Solution.
@wonka1234 Just add Count of Business to Line Y-axis?
To update - what worked for me was doing what @Greg_Deckler said. But i had to remove my filter then re add it.
@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?
Hi @wonka1234 ,
You can try code as below.
Line Value =
COUNTX ( ALLEXCEPT ( 'Table', 'Table'[Date] ), [Business] )
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@wonka1234 You could create a measure like: Line Value = COUNTX( ALL( 'Table' ), [Business] )
@wonka1234 Just add Count of Business to Line Y-axis?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |