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