Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
mifrasmm
Helper I
Helper I

Stack Bar Chart

Hi 

 

Im running SQL direct query , I having stack bar that calculating current status . is there anyway i can get available (Remaining) vechicles in stack bar. I have got PICKUP  24 , TRUCK 57 , VAN 36. 

stackbar.png

 

 

5 REPLIES 5
Anonymous
Not applicable

Hi @mifrasmm,

What is the structure of your tables? If you have tables as shown in the following screenshot and have created relationship between the two tables.
1.PNG2.PNG3.PNG

Firstly create a measure in Table1 using DAX below.

Measure = SUM(Table1[Amount])

Secondly create a measure in Table2 using DAX below.

Remaining amount = SUM(Table2[Available amount])-[Measure]

Thirdly, if you want to show data in Stack bar chart, please remove column from Legend and create the visual as follows.
5.PNG

However, if you want to reserve status, then create Line and clustered column chart instead of Stack bar chart.

4.PNG

 


Thanks,
Lydia Zhang

 

 

Hi Lydia ,

 

Thanks for replying 

 

van.png

Counting equipment type , Return status "NO" , fetching live details

 

Anonymous
Not applicable

Hi @mifrasmm,

Are all data stored in a single table? And do you want to count the number of each EQUIP_TYPE with "NO" status? Please help to post the expected result here.

Thanks,
Lydia Zhang

HI @Anonymous,

 

I have two table

 

Vechicle details

 

EQUIPMENT_CODEEQUIPMENT_TYPE
A 28587Truck
C 84857VAN
D 95868Truck
E 51643Bus
F 31655Truck
F 48681Bus
F 64406Truck
F 65808Truck
F 66304Truck

 

Then Live data, When vechicle go it will be NO status, when its return it will change to YES

 

van.png

Now i can see how many currently out with status of NO , I just want to see how many remaning 

 

i think given solution will work , if i create one more table with constent value ( VAN = 36 , TRUCK = 57 , PICKUP = 24) , Any other idea 

Anonymous
Not applicable

Hi @mifrasmm,

Where do these values (VAN = 36 , TRUCK = 57 , PICKUP = 24) come from? For example, for Van, you plus the number of "NO" status and "Yes" status, then you get 36? And do you want to count the number of "Yes" status for Van, TRUCK and PICKUP now?

Thanks,
Lydia Zhang

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.