- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Shaping Dates into categories
Hi All,
I am trying to structure my X axis by hour but in a specific order. So by default Power BI would arrange my hours from 0 - 23
or it would kind of just mix them up as below.
The result i am trying to acheive is like this:
Please help me in the right direction to replicate the second visual
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Anybody have ideas:)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi, @Freeseman
You need to enter a custom table and then sort Column ‘Category’ by Column 'Sort column'.
After you establish a relationship between the custom table and the fact table, you can replace the existing fields with the new fields like below:
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@v-easonf-msft Thank you for the advice. Please see https://community.powerbi.com/t5/Desktop/Average-per-Category-Please-help/m-p/2702026#M945089
I managed to get this far. Is the next step possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi, @Freeseman
Try to use 'Line and clustered column chart' to replace 'clustered column chart' so that you can add custom line chart as below:
Average of Part1 = if(MAX('Fact Table'[Category (groups)])="Part1",CALCULATE(AVERAGE('Fact Table'[Value]),FILTER(ALL('Fact Table'),'Fact Table'[Category (groups)]="Part1")))
Average of Part2 = if(MAX('Fact Table'[Category (groups)])="Part2",CALCULATE(AVERAGE('Fact Table'[Value]),FILTER(ALL('Fact Table'),'Fact Table'[Category (groups)]="Part2")))
......
Best Regards,
Community Support Team _ Eason
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

This is extremely helpful.
I need the average of the SUM of production per group. I tried this:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

I think it has something to do with the way its grouping the times vs reading the production value?
Production is SUM over multiple timestamps because there are many production values from different machines in the hours. SO i need the sum of the total hour groups production which i believe is possible but the meassure needs to change calculation?
Its making all average line 97.xx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi, @Freeseman
Please convert the chart into a table visual, which will be easy to find the problem.
Can you share a copy of the sample data?
Best Regards,
Community Support Team _ Eason
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thank you.
The data is a lot to share as i have many other tabes from other DB tables.
The way you explain to me is very good and helps me a lot. I just need to fix meassure calculation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi, @Freeseman
I suspect this has something to do with the date slicers.
Is 'Shift Date' a field in a separate calendar table?
Will the result of the current measure "Evening Shift Change" change with the value of slicer 'shift_date'?
After you clear the filter criteria for the date slicer, is the calculation result correct?
NS Lunch =
IF (
MAX ( 'PRODUCTION'[TIMESTAMP (groups)] ) = "2. NS Lunch",
CALCULATE (
AVERAGE ( 'PRODUCTION'[PRODUCTION] ),
FILTER (
ALL ( 'PRODUCTION' ),
'PRODUCTION'[TIMESTAMP (groups)] = "2. NS Lunch"
&& 'PRODUCTION'[Shift Date] IN VALUES ( 'PRODUCTION'[Shift Date] )
)
)
)
Best Regards,
Community Support Team _ Eason
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

I tried to upload the file for you but its not allowing me.
I tried your new measure but same issue... i am not sure where it is taking this average from because i need the average of the 2 totals (0 and 23)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi, @Freeseman
If possible, upload a sample file to cloud storage and share the link here.
Best Regards,
Community Support Team _ Eason
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@v-easonf-msft Please look. 🙂
I need help caterorising average per time category per day but also drag slider and need average over time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi, @Freeseman
Sorry for later reply. The link seems to have expired, can you share it again?
Best Regards,
Community Support Team _ Eason
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @v-easonf-msft , Struggle with company procedure.
Does this help
I have time stamps but the average is calculated per row and not per category?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Wow, i am amazed. 🙂 Thank you. Let me try this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

I need the dates ordered from 18,19,20,21,22 then 23,0 Then 1,2,3,4 Then 5,6,7,8 Then 9,10,11 Then 12,13 Then 14,15,16,17
It is from 6pm to 5pm over a 24h

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
11-16-2024 09:12 AM | |||
10-30-2024 07:20 AM | |||
12-10-2024 03:03 AM | |||
01-06-2025 01:07 AM | |||
07-19-2024 11:29 AM |
User | Count |
---|---|
84 | |
81 | |
52 | |
37 | |
36 |
User | Count |
---|---|
104 | |
85 | |
48 | |
43 | |
41 |