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 Datafam.
I want to convert my excel formula "=IF(OR(AB6<>0,AL6="A"),SUMPRODUCT(--($E$6:$E$5160=E6),--($G$6:$G$5160=G6),--($M$6:$M$5160=M6),--($AK$6:$AK$5160<>"E"),$Y$6:$Y$5160),0)" into DAX.
Thanks,
Pratik.S
Solved! Go to Solution.
Hi @UI
"=IF(OR(AB6<>0,AL6="A"),SUMPRODUCT(--($E$6:$E$5160=E6),--($G$6:$G$5160=G6),--($M$6:$M$5160=M6),--($AK$6:$AK$5160<>"E"),$Y$6:$Y$5160),0)"
you can try this, create a column
column=
var _expression_true= SUMX(<table>, <expression>) // This corresponds to SUMPRODUCT()
var _expression_false=0
return
if( table[column AB6]<>0 || table[column AL6]="A", _expression_true,_expression_false)
in excel you could sum up individual cells but in power bi, when you use a sum function it's summing up the entire column. So when doing summation calculation, we need to filter the table.
since not sure what are you trying to sum up, could you share some sample data? then we can work on it further.
Also, please watch this video, it will help starters to understand DAX.
📊 How to use Power BI DAX - Tutorial - YouTube
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @UI
"=IF(OR(AB6<>0,AL6="A"),SUMPRODUCT(--($E$6:$E$5160=E6),--($G$6:$G$5160=G6),--($M$6:$M$5160=M6),--($AK$6:$AK$5160<>"E"),$Y$6:$Y$5160),0)"
you can try this, create a column
column=
var _expression_true= SUMX(<table>, <expression>) // This corresponds to SUMPRODUCT()
var _expression_false=0
return
if( table[column AB6]<>0 || table[column AL6]="A", _expression_true,_expression_false)
in excel you could sum up individual cells but in power bi, when you use a sum function it's summing up the entire column. So when doing summation calculation, we need to filter the table.
since not sure what are you trying to sum up, could you share some sample data? then we can work on it further.
Also, please watch this video, it will help starters to understand DAX.
📊 How to use Power BI DAX - Tutorial - YouTube
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
@UI , Can you share what calculation is needed
You can sumx or productX
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 |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |