Skip to main content
cancel
Showing results for 
Search instead 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

Reply
nchand
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. 

PowerBI.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

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

NickolajJessen_1-1654247888593.png

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

NickolajJessen_2-1654247974011.png

3. Create relationship between the two tables
4. Voila

NickolajJessen_3-1654248003169.png

 

 

 

 

 

View solution in original post

5 REPLIES 5
NickolajJessen
Solution Sage
Solution Sage

Here you go 🙂

NickolajJessen_1-1654244619748.png

 

 

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)

PowerBI.jpg

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

NickolajJessen_1-1654247888593.png

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

NickolajJessen_2-1654247974011.png

3. Create relationship between the two tables
4. Voila

NickolajJessen_3-1654248003169.png

 

 

 

 

 

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?  

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


 

Helpful resources

Announcements
Fabric Community Conference

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.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

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