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 guys,
I am trying to make a new measure in Power BI Desktop but I can not make it to work.
The situation:
If Col1 and Col2 is >0.99 then I would like to sum ATE and EA
Can someone please help me?
Thanks
Solved! Go to Solution.
Hi,
Do you mean this
=IF([Col1]>0.99&&[Col2]>0.99&&[Col1]<1.2&&[Col2]<1.2,MAX(0,[ATE]+[EA]),BLANK())
Just to add that this is possible with a measure using SUMX (). Whether this is better than the column depends on your use case.
Measure = SUMX ( Table, IF ( Table[Col1] > 0.99 && Table[Col1] < 1.2 && Table[Col2] > 0.99 && Table[Col2] < 1.2, Table[ATE] + Table[EA], 0 ) )
Hi,
I think you need a calculated column formula. Try this
=IF(AND([Col1]>0.99,[Col2]>0.99),[ATE]+[EA],BLANK())
Hope this helps.
Hi,
Hi,
Try this calculated column formula
IF([Col1]>0.99&&[Col2]>0.99&&[Col1]<1.2&&[Col2]<1.2,[ATE]+[EA],BLANK())
hi, @Stuznet
what is the expected output of is there a way to not to include the negative value?
IF(logical_test>,<value_if_true>, value_if_false)
You can just add your condition in logical_test, and it will work as you expect.
Best Regards,
Lin
Just to add that this is possible with a measure using SUMX (). Whether this is better than the column depends on your use case.
Measure = SUMX ( Table, IF ( Table[Col1] > 0.99 && Table[Col1] < 1.2 && Table[Col2] > 0.99 && Table[Col2] < 1.2, Table[ATE] + Table[EA], 0 ) )
@Ashish_Mathur @Anonymous Thank you so much for your help. Both solutions worked 🙂
Hi,
Do you mean this
=IF([Col1]>0.99&&[Col2]>0.99&&[Col1]<1.2&&[Col2]<1.2,MAX(0,[ATE]+[EA]),BLANK())
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 |
---|---|
113 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |