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 Everybody
I want to calculate a column with a condition. I want to make a SUM of several columns with one condition like this:
IF [Estado] = "Pagado" THEN SUM ([Pago]+[Pago2]+[Pago3]+[Pago4]+[Pago5])
IF [Estado] = "En Proceso" THEN DON'T SUM.
I'm new on this thanks for your comments.
Solved! Go to Solution.
I believe you could do something like.
if([Estado ="Pagado", [Pago] + [Pago2] + [Pago3] + [Pago4] + [Pago5])
Hi @FabAug,
I think switch function will suitable for your requirement.
Sample:
Result = SWITCH ( [Estado], "En Proceso", "", "Pago", [Pago], "Pago2", [Pago2], "Pagado", [Pago] + [Pago2] + [Pago3] + [Pago4] + [Pago5] )
Regards,
Xiaoxin Sheng
Hi @FabAug,
I think switch function will suitable for your requirement.
Sample:
Result = SWITCH ( [Estado], "En Proceso", "", "Pago", [Pago], "Pago2", [Pago2], "Pagado", [Pago] + [Pago2] + [Pago3] + [Pago4] + [Pago5] )
Regards,
Xiaoxin Sheng
I believe you could do something like.
if([Estado ="Pagado", [Pago] + [Pago2] + [Pago3] + [Pago4] + [Pago5])