cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Regular Visitor

## Convert to 30min interval

Hello All,

I am trying to plot a line graph with two variables—time in 30min intervals on the x-axis and count of #ppl in that time frame.

How to convert this column to represent time in every 30min interval? Many thanks for considering my request.

1 ACCEPTED SOLUTION
Solution Sage

You can make it easily:
1. Adjust the formulas to AM PM format

2. Create a table in power query with you categories and add index (make sure to filter cate category by the index)

3. Create relationship between the two tables
4. Voila

5 REPLIES 5
Solution Sage

Here you go 🙂

Regular Visitor

Thanks for this solution. will use this if I cannot make it to this format below: (not sure how to aggregate to this model tho)

Solution Sage

You can make it easily:
1. Adjust the formulas to AM PM format

2. Create a table in power query with you categories and add index (make sure to filter cate category by the index)

3. Create relationship between the two tables
4. Voila

Regular Visitor

I have a doubt in this. When we say this

Table[Timestamp]<TIMEVALUE("08:00"), "8;00am"
Table[Timestamp]<TIMEVALUE("08:30"), "8;30am"

If I had a 06:30 in the Timestamp column. what will it be considered? 8 or 8;30am?

Solution Sage

That's a great questions!
it returns the first value that is TRUE

Table[Timestamp]<TIMEVALUE("08:00"), "8;00am" // This is true // AND THIS IS FIRST
Table[Timestamp]<TIMEVALUE("08:30"), "8;30am" // This also true, but is never evaluated, beause the first the first was true

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors