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
soorajskn
Regular Visitor

Convert an excel formula to Power Query

I have an excel formula which I am trying to replicated on power query 

 

AK – Concat (text)

E – Opened (Date)

Days between  =IF($AK2=$AK3,($E3-$E2),"")

 

Can someone explain me how this can be replicated? 

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

1)you need to create a column index

Screen Capture #1006.pngScreen Capture #1008.png

2)

Screen Capture #1007.png

View solution in original post

5 REPLIES 5
Ahmedx
Super User
Super User

1)you need to create a column index

Screen Capture #1006.pngScreen Capture #1008.png

2)

Screen Capture #1007.png

Ahmedx
Super User
Super User

Share some data to work with (in a format the can be pasted in an MS Excel file) and show the expected result.

Hello @Ahmedx  

 

Thank you for your response. Here is the excel sheet. 

 

OpenedConcat-User/CI/SubcatDays BWN 
13-03-2023 10:52A00011Active Directory PasswordHow To  
14-03-2023 15:38BB00532Active Directory PasswordHow To0.083333333 
14-03-2023 17:38BB00532Active Directory PasswordHow To  
22-03-2023 13:03AA00800WN-KSSlow/Freezing1.166666667 
23-03-2023 17:03AA00800WN-KSSlow/Freezing  

 

soorajskn_0-1682881380947.png

 

ribisht17
Super User
Super User

@soorajskn 

 

https://excelquick.com/excel-power-query/power-query-concatenate-text-and-numeric-data/

 

Regards,

Ritesh

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !! PL 300 Certification Series

@ribisht17  Thank you for your quick response. 

 

I am not looking for Concatenation formula.  I am trying to convert the below excel formula to power Query 

 

Days between  =IF($AK2=$AK3,($E3-$E2),"")

 

Days between = If AK2 is equals to AK3, then E3 - E2, else Null.

 

This is the requirement 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors