Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

stack bar chart

Hello, I have to create a Stacked bar chart shown in the picture, which shows data from the last 30 days last 60 days, and so on. and I am uploading the data sample too. 

I have tried a lot by creating columns, using other tips and tricks but couldn't succeed. Please kindly show me any way to do it. I would really appreciate it. 

 

 

 

Thanks.

17 Replies

  • Anonymous  Create a conditonal coloumn in power query from date open coloumn and use below formula ti get today date .

     

    Date.From(DateTime.LocalNow()

     

    then subtract today - exact date from table  ( [Date today] - [Date] )

    it will give you total day then create a coditional column .

     

    kindly refer this image 

     

    output result 

     

    output pbi

     

    Anonymous  Kindly check and let me know .

     

    Have you tried this ?

     

    try this and let me know 

    Kudos will be appriciated   😊

     

     

     

  • Hi, Anonymous 

    I assume you have the below grouping table.

    Please check the below measure.

    Once the below measure is inserted into the visualization, then you can segment by group column in the grouping table.

    If it is OK with you, share your sample pbix file's link here, then I can try to look into it to come up with a more accurate measure.

     

     

     

    Values Total by group =
    SUMX (
    FILTER (
    VALUES ( 'Calendar'[Date] ),
    COUNTROWS (
    FILTER ( 'Group', [Days Open] >= 'Group'[Min] && [Days Open] < 'Group'[Max] )
    ) > 0
    ),
    [Values Total]
    )

     

     

    Hi, My name is Jihwan Kim.

     

    If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

     

    Linkedin: linkedin.com/in/jihwankim1975/

    Twitter: twitter.com/Jihwan_JHKIM

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,  Jihwan_Kim thanks for answering. No, I don't have such a grouping table. and the visual I have shared here is not from PBX. probably in excel. this is a sample I have to create the same thing in Power BI. 

      so can you describe to me how I can create this grouping table?

       

      Thanks 

      • Jihwan_Kim's avatar
        Jihwan_Kim
        Super User

        Hi, Anonymous 

        Thank you for your feedback.

        You can create the grouping table exactly the same looking as the above picture that I attached.

        If you can share your sample excel file's link here, I can try.

        Thanks.

      • Jihwan_Kim's avatar
        Jihwan_Kim
        Super User

        Hi, Anonymous 

        Sorry that I could not find the link before.

        Now, I see the link. However, it asks to enter a password.

        Please kindly check.

        Thank you.