Forum Discussion

harirao's avatar
harirao
Post Prodigy
6 years ago
Solved

Grouping in Bar Graph Chart

Hi All,

I am working on a visualization, where i have to group below Y axis i.e "Weeks of Visibility" as mentioned below.

  • 0 to 23 weeks should be visible in graph
  • >6 months = Week 24 till 47
  • >12 months = Week 48 till 71
  • >18 months = Week 72 and aboveCan we implement this in this above Bar Graph?

    Regards,
    Hari
  • Hi harirao ,

     

    Based on your description,I created a sample table as below:

    First create a calculated column to get week number:

     

    Weeknum = WEEKNUM('Table (2)'[Date],2)

     

     Then create a calculted column per your request:

     

    Column 2 = IF('Table (2)'[Weeknum]>=0&&'Table (2)'[Weeknum]<=23,""&'Table (2)'[Weeknum],IF('Table (2)'[Weeknum]>=24&&'Table (2)'[Weeknum]<=47,">6 months",IF('Table (2)'[Weeknum]>=48&&'Table (2)'[Weeknum]<=71,">12 months",IF('Table (2)'[Weeknum]>=72,">18 months",BLANK()))))

     

    Finally you will see:

    Here is a sample .pbix file you can refer to.

     

    Best Regards,
    Kelly
    Did I answer your question? Mark my post as a solution!

5 Replies