Forum Discussion
KPI Percentage difference - discard empty values
- 1 year ago
Hi tonijj
Question 1:
try this measure
KPI_PercentageDifference (%) := AVERAGEX( FILTER( Products, Products[WalmartPrice] > 0 && Products[PublixPrice] > 0 ), ABS(Products[WalmartPrice] - Products[PublixPrice]) / DIVIDE((Products[WalmartPrice] + Products[PublixPrice]), 2) ) * 100You could also do this in power query, setting up a calculated column to show 'true' if both values are present, 'false' if one is missing, then filter false
= if [WalmartPrice] = null or [PublixPrice] = null or [WalmartPrice] = 0 or [PublixPrice] = 0 then true else falseQuestion 2:
Power query is the easiest place to replace values, select 'transform data', go to the table you need, right click the column and select 'replace values'.
If this helps please give a thumbs up and mark as the solution, thanks.
Hi tonijj
wardy912 Elena_Kalina Thanks for your inputs.
I hope the information shared was helpful to you. If your question has been answered, kindly mark the most relevant reply as the Accepted Solution. This small action can make a big difference for others who are looking for the same solution.
Hi tonijj
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
- v-priyankata1 year agoCommunity Support
Hi tonijj
Hope everything’s going smoothly on your end. We haven’t heard back from you, so I wanted to check if the issue got sorted If yes, marking the relevant solution would be awesome for others who might run into the same thing.