Forum Discussion

mifrasmm's avatar
mifrasmm
Helper I
9 years ago

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. 

 

 

5 Replies

  • Anonymous's avatar
    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.


    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

    • mifrasmm's avatar
      mifrasmm
      Helper I

       

       

      Hi Lydia ,

       

      Thanks for replying 

       

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

       

      • Anonymous's avatar
        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