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 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 | |