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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
Having trouble calculating sum in Power BI.
Idea is to use either sum1 either sum2 measure depending on data table value.
If data table value is equal to "Taip" then we use sum2, else we use sum2.
I tried this formula:
bendra_suma_ar_objektine8 =
if(SELECTEDVALUE(_op_kiekis[Objektinė apskaita]) in {"Taip",""}, [Bendra kaina_new],
[Bendra kaina_new_be_obj]
)
But it doesn't works. Seems it always use bendra kaina_new_be_obj measure even should be swiped.
Here is a visual:
I marked that output match second column instead of first column.
So how to resolve my issue?
Solved! Go to Solution.
Hi,
Does this measure work?
bendra_suma_ar_objektine8 = if(max(_op_kiekis[Objektinė apskaita])="Taip",[Bendra kaina_new],[Bendra kaina_new_be_obj])
Hope this helps.
Hi,
Does this measure work?
bendra_suma_ar_objektine8 = if(max(_op_kiekis[Objektinė apskaita])="Taip",[Bendra kaina_new],[Bendra kaina_new_be_obj])
Hope this helps.
Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. I cannot use screenshots of your source data.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.