The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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?