Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Grouping column values

This is the visual I am currently working on, tracking aging tickets. The X-axis is derived from a Measure I created called "DaysSinceOpen" which is just a measure of DateDiff of the created date to today. I'd like to be able to get that DaysSinceOpen field on the X axis grouped into columns, for example the first column would be "1-7 days" and the next would be 8-15 days and so on. Here's a screenshot of the fields:

If anyone knows how to accomplish this that would be greatly appreciated, as I am still pretty new to PowerBI. Thanks!

  • You could try wrapping the datediff in if statements: e.g for 1-7 days 

     

    Dayssinceopen = if(DATEDIFF(MAX('Table'[created date]),today(),DAY)<8,"1-7","more")
     
    then just add more conditions,
     
    hope this helps

1 Reply

  • DOLEARY85's avatar
    DOLEARY85
    Resident Rockstar

    You could try wrapping the datediff in if statements: e.g for 1-7 days 

     

    Dayssinceopen = if(DATEDIFF(MAX('Table'[created date]),today(),DAY)<8,"1-7","more")
     
    then just add more conditions,
     
    hope this helps