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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
surajde
Helper I
Helper I

Last Modified Time

HI All, 

 

Need your help with BI Formula for below dummy data. 
In excel it was much easy. Need to push this to PowerBI. Please help with below scenario to replicate this in PowerBi

 

if you copy this to Excel use below formula in Current Group Time Column: 

=IF(A2<>A1, E2, IF(B2<>B1, E2, F1))

 

Expected result should be as per Current Group Time. 

 

Request IDGroup NameAnalystRequest Created onRequest Modified on Current Group Time
K1122334MOD Tier 1-5/1/23 10:32 AM5/1/23 10:32 AM5/1/23 10:32 AM
K1122334MOB IT PPET-5/1/23 10:32 AM5/1/23 10:48 AM5/1/23 10:48 AM
K1122334IT_Q2A_E2E-5/1/23 10:32 AM5/1/23 12:01 PM5/1/23 12:01 PM
K1122334IT_Q2A_E2EShawn Trieloff5/1/23 10:32 AM5/1/23 12:36 PM5/1/23 12:01 PM
C2244666MOD Tier 1-5/1/23 10:55 AM5/1/23 10:55 AM5/1/23 10:55 AM
C2244666MOD Tier 1-5/1/23 10:55 AM5/1/23 10:57 AM5/1/23 10:55 AM
C2244666MOD Tier 1Neelam Seth5/1/23 10:55 AM5/1/23 11:11 AM5/1/23 10:55 AM
C2244666MOD Tier 1Neelam Seth5/1/23 10:55 AM5/1/23 11:50 AM5/1/23 10:55 AM
D6677888MOD Tier 1-5/1/23 1:00 PM5/1/23 1:00 PM5/1/23 1:00 PM
D6677888MOD Tier 1Anand Mane5/1/23 1:00 PM5/1/23 1:35 PM5/1/23 1:00 PM
D6677888MOD Tier 1Neelam Seth5/1/23 1:00 PM5/1/23 4:54 PM5/1/23 1:00 PM
D6677888MOD Tier 1Neelam Seth5/1/23 1:00 PM5/1/23 4:55 PM5/1/23 1:00 PM
D6677888MOD Tier 1-5/1/23 1:00 PM5/5/23 12:45 PM5/1/23 1:00 PM
D6677888BMG Management-5/1/23 1:00 PM5/5/23 12:58 PM5/5/23 12:58 PM
D6677888BMG ManagementCourtney Morgan5/1/23 1:00 PM5/10/23 4:37 PM5/5/23 12:58 PM
D6677888MOD Tier 1-5/1/23 1:00 PM5/16/23 1:59 PM5/16/23 1:59 PM
D6677888MOD Tier 1Anand Mane5/1/23 1:00 PM5/16/23 2:35 PM5/16/23 1:59 PM
D6677888MOD Tier 1Abhishek Mishra5/1/23 1:00 PM5/16/23 4:00 PM5/16/23 1:59 PM
D6677888MOD Tier 1Bheemsen Dasnurkar5/1/23 1:00 PM5/17/23 12:59 AM5/16/23 1:59 PM
D6677888MOD Tier 1Bheemsen Dasnurkar5/1/23 1:00 PM5/17/23 1:05 AM5/16/23 1:59 PM
J4357593MOD Tier 1-5/2/23 1:52 AM5/2/23 1:52 AM5/2/23 1:52 AM
J4357593MOD Tier 1Bheemsen Dasnurkar5/2/23 1:52 AM5/2/23 1:56 AM5/2/23 1:52 AM
J4357593FI Quality-5/2/23 1:52 AM5/2/23 8:51 AM5/2/23 8:51 AM
J4357593FI QualityRahul Pawar5/2/23 1:52 AM7/28/23 2:03 PM5/2/23 8:51 AM
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @surajde ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2)Click on "transform data" to enter the power query and add index a column.

(3) We can create calculated columns.

Column = MAXX(FILTER('Table',[Request ID]=EARLIER('Table'[Request ID])&&[Index]=EARLIER('Table'[Index])-1),[Group Name])
Column 2 = IF(OR([Column]=BLANK(),[Group Name]<>[Column]),[Request Modified on ])
Column 3 = var a=MAXX(FILTER('Table',[Request ID]=EARLIER('Table'[Request ID])&&[Group Name]=EARLIER('Table'[Group Name])&&[Index]<EARLIER('Table'[Index])&&[Column 2]<>BLANK()),[Index])
return IF([Column 2]<>BLANK(),[Column 2],IF([Group Name]=[Column],LOOKUPVALUE('Table'[Column 2],'Table'[Index],a)))

(4) Then the result is as follows.

vtangjiemsft_0-1691138871892.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @surajde ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2)Click on "transform data" to enter the power query and add index a column.

(3) We can create calculated columns.

Column = MAXX(FILTER('Table',[Request ID]=EARLIER('Table'[Request ID])&&[Index]=EARLIER('Table'[Index])-1),[Group Name])
Column 2 = IF(OR([Column]=BLANK(),[Group Name]<>[Column]),[Request Modified on ])
Column 3 = var a=MAXX(FILTER('Table',[Request ID]=EARLIER('Table'[Request ID])&&[Group Name]=EARLIER('Table'[Group Name])&&[Index]<EARLIER('Table'[Index])&&[Column 2]<>BLANK()),[Index])
return IF([Column 2]<>BLANK(),[Column 2],IF([Group Name]=[Column],LOOKUPVALUE('Table'[Column 2],'Table'[Index],a)))

(4) Then the result is as follows.

vtangjiemsft_0-1691138871892.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.