We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello Power BI Community,
Am fairly new with PBI, and I would love to know your thoughts on this problem am coming across.
I have done an IF calculation on my organization dataset and I am coming across a problem of summing the result of my IF statement.
IF Statement Formula:
IF([Quality%] >= 0.7, 1,0)
How would I be able to sum the 2nd column and devide over the numbers of days?
Any help is greatly appreciated!
Thank you,
Mohammed
Solved! Go to Solution.
Hi @Anonymous ,
Since your IF Statement is a measure, you could try to create a summarized table ,then use SUMX() to get the count when =1:
Then you could use DIVIDE() , COUNTROWS() to get final output.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Since your IF Statement is a measure, you could try to create a summarized table ,then use SUMX() to get the count when =1:
Then you could use DIVIDE() , COUNTROWS() to get final output.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Eyelyn9,
Thank you, this worked great with me.. appreciate the help.
Regards,
Mo
Unfortunatly it didn't work. I believe SUM(YourIfStatementColumns) is not allowed due to the nature of The IF Statement.
Note that this IF statement is a measure and not part of the datatable. Am guessing PBI isn't adaptable to SUM Logical Values results which cause this problem.
Hope this helps in finding alternative solutions.
Thank you in advance!
Mo
Hi @Anonymous ,
How about something like this:
YourMeasure = DIVIDE ( SUM ( 'YourTable'[YourIfStatementColumn] ), COUNTROWS ( 'YourTable' ) )
Does this solve your issue? 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
| Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
| Also happily accepting Kudos 🙂 |
| Feel free to connect with me on LinkedIn! | |
| #proudtobeasuperuser | |
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 10 | |
| 8 | |
| 7 | |
| 7 | |
| 5 |