The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I'd like to find a smart way to change sign to values (from + to minus) based on a attribute.
If field/column "Bal Type" is "Expense" get a negative value from field/column "Value"
Any help?
Thank you
Solved! Go to Solution.
@Specialist90 Well, you could do this in a calculated column like:
Column = IF([Bal Type] = "Expense", [Value] * -1, [Value])
You could also do it as a conditional column in Power Query. Or, could also do it as a measure with a SUM aggregation.
@Specialist90 Well, you could do this in a calculated column like:
Column = IF([Bal Type] = "Expense", [Value] * -1, [Value])
You could also do it as a conditional column in Power Query. Or, could also do it as a measure with a SUM aggregation.
@Specialist90 , You can use Switch to create
Switch(True(),
[Bal Type] = "Expense", -1 *[Value] ,
[Bal Type] = "Income", [Value]
)