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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
surajde
Helper I
Helper I

PowerBI same column calculation

Hi, 

 

I need help for performing calculation within same column on PowerBI like I did it in MS Excel. 

=IF(A2<>A1, "NULL", F2). 

 

How to put this formula in DAX?

 

surajde_0-1681458294638.png

 

10 REPLIES 10
Ashish_Mathur
Super User
Super User

Hi,

It is easier to solve this in the Query Editor.  If you are interested, then share data in a format the can be pasted in an MS Excel file and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur , @lbendlin 

 

Here is the data you need. I need calculaiton in last two columns. Start time and Stop time. 

Start time : 

=IF(A2<>A1, "NULL", F2). 

 

Stop Time :

=IF(A3=A2, F3, "NULL")

 

TICKET_NUMTICKET_OPENEDSEVERITYACTIVITY_TYPETICKET_STATE1ACTIVITY_TIMESTART_TIMESTOP_TIME
3097037485/2/2022 13:214Customer LogQueued5/2/2022 13:21NULL5/2/2022 13:21
3097037485/2/2022 13:214Initial CreationQueued5/2/2022 13:215/2/2022 13:215/4/2022 13:57
3097037485/2/2022 13:214Customer LogQueued5/4/2022 13:575/4/2022 13:575/6/2022 15:17
3097037485/2/2022 13:214Customer LogQueued5/6/2022 15:175/6/2022 15:17NULL

Hi,

Would you be OK with a Query Editor solution?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur @lbendlin  

any luck on above mentioned query, please? 

why does the start_time need to be null for the first entry? Do you need a measure or is a calculated column enough?

Hi @lbendlin

A calulted column is enough. this way I will be able to count the actual differed time. 

 

surajde_0-1681731913352.png

 

@lbendlin Sorry for chasing you. But got any luck? 

why does the start_time need to be null for the first entry?

I think you're not reading formulas and data proper. You can try inserting dummy data to excel and use formulas given for Start_Time and Stop_Time then see the result. I need exact same replicated in PowerBI

lbendlin
Super User
Super User

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.