Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi all,
I need to create a new column that is either 0 or 1 based on some criteria:
If date named posting date is equal to or greater than 18-01-2021
and If category named initiative <> "active"
and If category named items = "finetune"
If all criteria is met then 1 else 0
Solved! Go to Solution.
Hi, @Anonymous ;
you could use M lanuage by the following:
if [Posting Date]>=#date(2021,1,18) and [Price Initiative]="Finetune" and [Initiative Period]<>"Active"then 1 else 0
and another custom column as follows:
let _a=[Business Unit]
in List.Min(
Table.SelectRows(#"Changed Type",each [Initiative Period] = "Active"
and [Price Initiative] = "Finetune" and [Business Unit]=_a)[Posting Date])
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, @Anonymous ;
you could use M lanuage by the following:
if [Posting Date]>=#date(2021,1,18) and [Price Initiative]="Finetune" and [Initiative Period]<>"Active"then 1 else 0
and another custom column as follows:
let _a=[Business Unit]
in List.Min(
Table.SelectRows(#"Changed Type",each [Initiative Period] = "Active"
and [Price Initiative] = "Finetune" and [Business Unit]=_a)[Posting Date])
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.
There is still something wrong with the custom formula.. =/
Hey @Anonymous ,
you can try the following calculated column:
New Column =
IF(
myTable[Date] >= DATE(2021,01,18)
&& myTable[category named initiative] <> "active"
&& myTable[category named items] = "finetune",
1,
0
)
Thanks, I think it worked.
However i have this other column that was created using a measure and not created inside the edit query, which now doesn't work anymore.
Could you please help me also create a custom column with these criteria:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
102 | |
84 | |
79 | |
70 |
User | Count |
---|---|
120 | |
110 | |
95 | |
82 | |
77 |