Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Aggregate Hourly graph

Hi,

 

I've been trying to create the below graph in PowerBI:

 

It's a month's worth of data aggregated per time bracket.

 

My data column in BI has both date and time, however I can't just drill through like I'd hoped, and when I created a "Time Bracket" column using the following formula:  TIME BRACKET = MROUND(RP566[CREATE_DATE_TIME],"0:30") however when I create the graph using this as an axis, it keeps the data separated by date instead of aggregating it:

 

Any idea how I would achieve the above?

 

-Sam

 

 
  • Hi Anonymous 

    it's difficult to help you without seeing full data model but try something like that

    TIME BRACKET = MROUND(FORMAT(RP566[CREATE_DATE_TIME],"hh:mm:ss"),"0:30")

    do not hesitate to give a kudo to useful posts and mark solutions as solution

     

3 Replies

  • az38's avatar
    az38
    Community Champion

    Hi Anonymous 

    it's difficult to help you without seeing full data model but try something like that

    TIME BRACKET = MROUND(FORMAT(RP566[CREATE_DATE_TIME],"hh:mm:ss"),"0:30")

    do not hesitate to give a kudo to useful posts and mark solutions as solution

     

  • V-lianl-msft's avatar
    V-lianl-msft
    Community Support
    Hi Anonymous ,
     
    According to your description, you should format the year-month and time. Then take the time column as the X axis and the year-month column as the slicer.
    Please try the DAX like this:
     
    time = FORMAT(Sheet2[Start],"hh:mm:ss")
    year_month = FORMAT(Sheet2[Start],"YYYY-MM")
     
     
     
    Best Regards,
    Liang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.