Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
Trying to convert this formula from Excel and Power BI and not too sure how.
=IF([@SNStatus2]="OPEN","Outstanding Due",
IF([@ReceiptDate]<=[@[Due Date]],"On Time","Overdue Completion"))
Tried the following on Power BI but it doesn't work:
Solved! Go to Solution.
Hi @Anonymous ,
In Power BI Desktop, you can create measures or calculated columns.
The formula you provided belong to the calculated column.
Calculated column =
IF (
[SNStatus2] = "Open",
"Open",
IF (
[SNStatus2] = "Closed",
"Outstanding Due",
IF ( [ReceiptDate] <= [Due Date], "On Time", "Overdue Completion" )
)
)
Here's the measure you can try. We often use MAX function to reference the current row. The MIN function can also be used, and if it is a numeric type, the SUM function can also refer to the current row.
Measure =
IF (
MAX ( 'TableName'[SNStatus2] ) = "Open",
"Open",
IF (
MAX ( 'TableName'[SNStatus2] ) = "Closed",
"Outstanding Due",
IF (
MAX ( 'TableName'[ReceiptDate] ) <= MAX ( 'TableName'[Due Date] ),
"On Time",
"Overdue Completion"
)
)
)
Power BI: Calculated Measures vs. Calculated Columns | by Rod Castor | Towards Data Science
Calculated Column and Measure in Power BI (powerbiconsulting.com)
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
In Power BI Desktop, you can create measures or calculated columns.
The formula you provided belong to the calculated column.
Calculated column =
IF (
[SNStatus2] = "Open",
"Open",
IF (
[SNStatus2] = "Closed",
"Outstanding Due",
IF ( [ReceiptDate] <= [Due Date], "On Time", "Overdue Completion" )
)
)
Here's the measure you can try. We often use MAX function to reference the current row. The MIN function can also be used, and if it is a numeric type, the SUM function can also refer to the current row.
Measure =
IF (
MAX ( 'TableName'[SNStatus2] ) = "Open",
"Open",
IF (
MAX ( 'TableName'[SNStatus2] ) = "Closed",
"Outstanding Due",
IF (
MAX ( 'TableName'[ReceiptDate] ) <= MAX ( 'TableName'[Due Date] ),
"On Time",
"Overdue Completion"
)
)
)
Power BI: Calculated Measures vs. Calculated Columns | by Rod Castor | Towards Data Science
Calculated Column and Measure in Power BI (powerbiconsulting.com)
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
what error do you get?
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 |
---|---|
111 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |