Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Girish_123
Helper I
Helper I

GROUP THE VALUE IN SEPARATE COLUMN

TIME
11:03:01
11:03:02
11:03:03
11:05:05
11:05:06
11:56:04
11:56:05
11:59:59
12:00:00

I have a one column contain time i want a output like IN POWER QUERY OR DAX CALCULATION

TIMEdifferGroup
11:03:01 G1
11:03:021G1
11:03:031G1
11:05:05122G2
11:05:061G2
11:56:043,058G3
11:56:051G3
11:59:59234G4
12:00:001G4



1 ACCEPTED SOLUTION
Prateek97
Resolver III
Resolver III

Hi @Girish_123 ,

 

I was able to replicate the scenario using Power Query. 

 

Added a column to extract Hours and Minutes in a column using Column From Examples or you can use below formula.

= Table.AddColumn(#"Changed Type", "Replaced Text", each Text.Replace(Text.From([TIME], "en-IN"), ":", ""), type text)

Prateek97_0-1692340089984.png

 

Add this column as a new query.

Prateek97_1-1692340128301.png

 

Convert this query to Table.

Prateek97_2-1692340161017.png

 

Then Remove the duplicates and add a Index Column starting from 1.

Prateek97_3-1692340198414.png

 

Then come back to the original data table and merge the new query.

Prateek97_4-1692340238274.png

 

Extract the index column from the merged table.

Prateek97_5-1692340274089.png

 

Then you can simply concatenate G at the beginning of the index.

Prateek97_6-1692340329765.png

 

Hope this works for you.

 

Please mark this as a solution if it works.

View solution in original post

4 REPLIES 4
Girish_123
Helper I
Helper I

Hi Prateek Sir i want output like this can you please help me out 

TimeGAPOutput
11:09:04 G1
11:09:051G1
11:10:0661G2
11:10:071G2
11:10:081G2
11:12:01113G3
11:12:021G3
11:43:231881G4
11:43:241G4
12:59:584,594G5
12:59:591G5
13:00:001G5
13:00:011G5

 

 

Prateek97
Resolver III
Resolver III

Hi @Girish_123 ,

 

I was able to replicate the scenario using Power Query. 

 

Added a column to extract Hours and Minutes in a column using Column From Examples or you can use below formula.

= Table.AddColumn(#"Changed Type", "Replaced Text", each Text.Replace(Text.From([TIME], "en-IN"), ":", ""), type text)

Prateek97_0-1692340089984.png

 

Add this column as a new query.

Prateek97_1-1692340128301.png

 

Convert this query to Table.

Prateek97_2-1692340161017.png

 

Then Remove the duplicates and add a Index Column starting from 1.

Prateek97_3-1692340198414.png

 

Then come back to the original data table and merge the new query.

Prateek97_4-1692340238274.png

 

Extract the index column from the merged table.

Prateek97_5-1692340274089.png

 

Then you can simply concatenate G at the beginning of the index.

Prateek97_6-1692340329765.png

 

Hope this works for you.

 

Please mark this as a solution if it works.

hI PRATEEK 11:59:59 and 12:00:00 there is 1 sec gap it should come in G4 only not in G5

Hi @Girish_123 ,

 

What I could understand from the original question was you wanted to group the time which was in the same hour and same minute.

If that is not the case, can you please explain what would be the logic of grouping.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Kudoed Authors