Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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.
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.
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.
However, if you want to reserve status, then create Line and clustered column chart instead of Stack bar chart.
Thanks,
Lydia Zhang
Hi Lydia ,
Thanks for replying
Counting equipment type , Return status "NO" , fetching live details
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_CODE | EQUIPMENT_TYPE |
| A 28587 | Truck |
| C 84857 | VAN |
| D 95868 | Truck |
| E 51643 | Bus |
| F 31655 | Truck |
| F 48681 | Bus |
| F 64406 | Truck |
| F 65808 | Truck |
| F 66304 | Truck |
Then Live data, When vechicle go it will be NO status, when its return it will change to YES
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
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
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.