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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi all,
I am trying to create a new column: "Status"
Data sample:
| Date | Property | Building | Location | Client | Start | End | Break Date | Value | Status |
| 01/01/2021 | Prop1 | Build1 | Upper Flat | Vacant | £0.00 | ||||
| 01/01/2021 | Prop1 | Build1 | Upper Flat | MC | 01/01/2021 | 31/12/2021 | 01/08/2021 | £20,000.00 | |
| 19/08/2021 | Prop1 | Build1 | Upper Flat | MC | 01/01/2021 | 31/12/2021 | 01/09/2021 | £20,000.00 | TRUE |
| 02/09/2021 | Prop1 | Build1 | Upper Flat | MC | 01/01/2021 | 31/12/2021 | £20,000.00 | TRUE | |
| 03/03/2023 | Prop1 | Build1 | Upper Flat | MC | 01/01/2022 | 31/12/2022 | 01/06/2022 | £20,000.00 | TRUE |
| 01/01/2023 | Prop1 | Build1 | Upper Flat | Five Guys | 01/01/2023 | 31/12/2023 | 01/06/2023 | £25,000.00 | FALSE |
| 02/06/2023 | Prop1 | Build1 | Upper Flat | Five Guys | 01/01/2023 | 31/12/2023 | £25,000.00 | TRUE | |
| 01/01/2024 | Prop1 | Build1 | Upper Flat | Five Guys | 01/01/2024 | 31/12/2024 | 01/06/2024 | £25,000.00 | TRUE |
| 01/01/2025 | Prop1 | Build1 | Upper Flat | Addida | £25,000.00 | FALSE |
Screenshot:
Logic:
Obvisouly, this table will have multiple properties, multiple buildings and multiple locations.
Thanks in advance for your help
H
Solved! Go to Solution.
Hi, @Calvin69 ;
You could try to create a column by dax :
Status =
IF (
[Client] = "Vacant"
|| ([Break Date] < TODAY ()&& [Break Date] <> BLANK ()),
BLANK (),
IF (
[Break Date]= CALCULATE ( MIN ( [Break Date] ), ALLEXCEPT ( 'Table', 'Table'[Client] ) ),
"False",
"True"))
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Calvin69 ;
You could try to create a column by dax :
Status =
IF (
[Client] = "Vacant"
|| ([Break Date] < TODAY ()&& [Break Date] <> BLANK ()),
BLANK (),
IF (
[Break Date]= CALCULATE ( MIN ( [Break Date] ), ALLEXCEPT ( 'Table', 'Table'[Client] ) ),
"False",
"True"))
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Calvin69
If a break date for a location changes to future date Means break date > Today or > [Date]? And you want a DAX calculated column or Power Query? Here is one way in Power Query, and use > [Date]
#"Added Index" = Table.AddIndexColumn(yourPreviousStep, "Index", 0, 1, Int64.Type),
#"Added Custom" = Table.AddColumn(#"Added Index", "Status", each ([Break Date]>[Date] or [Break Date]=null ) and [Client]=#"Added Index"[Client]{[Index]-1})
Hi @Vera_33 ,
Thanks for your response, I really appreciate it.
Unfortunately, following the logic you mentioned above does not really provide me with what I am after as your proposed index column, indexes the whole data set under one sequence while in fact the index should be indexing entries per Client "for each client it restart numbering from 0 to Infinite".
I have managed to create successfully an index column "Using Dax" that does the indexing per Client however, I was not able to create a index like "Index Required".. Shown below..
Data sample:
| Date | Property | Building | Location | Client Index | Client | Index required | Start | End | Break Date | Value | Status |
| 01/01/2021 | Prop1 | Build1 | Upper Flat | 1 | Vacant | 1 | £0.00 | ||||
| 01/01/2021 | Prop1 | Build1 | Upper Flat | 1 | MC | 1 | 01/01/2021 | 31/12/2021 | 01/08/2021 | £20,000.00 | |
| 19/08/2021 | Prop1 | Build1 | Upper Flat | 1 | MC | 2 | 01/01/2021 | 31/12/2021 | 01/09/2021 | £20,000.00 | TRUE |
| 02/09/2021 | Prop1 | Build1 | Upper Flat | 1 | MC | 3 | 01/01/2021 | 31/12/2021 | £20,000.00 | TRUE | |
| 03/03/2023 | Prop1 | Build1 | Upper Flat | 1 | MC | 4 | 01/01/2022 | 31/12/2022 | 01/06/2022 | £20,000.00 | TRUE |
| 01/01/2023 | Prop1 | Build1 | Upper Flat | 2 | Five Guys | 1 | 01/01/2023 | 31/12/2023 | 01/06/2023 | £25,000.00 | FALSE |
| 02/06/2023 | Prop1 | Build1 | Upper Flat | 2 | Five Guys | 2 | 01/01/2023 | 31/12/2023 | £25,000.00 | TRUE | |
| 01/01/2024 | Prop1 | Build1 | Upper Flat | 2 | Five Guys | 3 | 01/01/2024 | 31/12/2024 | 01/06/2024 | £25,000.00 | TRUE |
| 01/01/2025 | Prop1 | Build1 | Upper Flat | 3 | Addida | 1 | £25,000.00 | FALSE |
I usually tend to DAX everything but I don't mind using P Query if it does deliver the right results.
Answering your question above:
If a break date for a location changes to future date Means break date > [Creation Date] - Hidden column
Somehow "Don't know yet how" the following should happen:
Thanks again
H
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 159 | |
| 132 | |
| 118 | |
| 79 | |
| 53 |