Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
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?
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.
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_NUM | TICKET_OPENED | SEVERITY | ACTIVITY_TYPE | TICKET_STATE1 | ACTIVITY_TIME | START_TIME | STOP_TIME |
| 309703748 | 5/2/2022 13:21 | 4 | Customer Log | Queued | 5/2/2022 13:21 | NULL | 5/2/2022 13:21 |
| 309703748 | 5/2/2022 13:21 | 4 | Initial Creation | Queued | 5/2/2022 13:21 | 5/2/2022 13:21 | 5/4/2022 13:57 |
| 309703748 | 5/2/2022 13:21 | 4 | Customer Log | Queued | 5/4/2022 13:57 | 5/4/2022 13:57 | 5/6/2022 15:17 |
| 309703748 | 5/2/2022 13:21 | 4 | Customer Log | Queued | 5/6/2022 15:17 | 5/6/2022 15:17 | NULL |
Hi,
Would you be OK with a Query Editor solution?
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.
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
Learn about the new windowing functions.
Introducing DAX Window Functions (Part 1) – pbidax (wordpress.com) INTRODUCING DAX WINDOW FUNCTIONS (PART 2) – pbidax (wordpress.com)
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 63 | |
| 51 | |
| 41 | |
| 19 | |
| 16 |
| User | Count |
|---|---|
| 123 | |
| 109 | |
| 47 | |
| 30 | |
| 25 |