Here we have Country Dimension which has Country values like US, India etc.
Measure used in table is Defect Per Million which is calculated by :
Sum(Defected Unit)/sum(Total Unit)* 1000000
We want to have another value Difference in Dimension which gives difference betweenDPMO of US and India
But Lead/ Lag works on Measures whereas this calculation needs to be done based on Dimension values.
we can write something like
if country=âDifferenceâ then
(if Country= âUSâ then âDefect Per Millionâ - if Country= âIndiaâ then âDefect Per Millionâ)
else
âDefect Per Millionâ
Difference can be added as Dummy value to Country column
Hi @anshulsri ! We hope either @bergqdou or @knamburi solution worked for you. Let us know if this is resolved. And if it is, please help the community by marking their answer as a âSolution.â
Thank you for your response @bergqdou .
But Difference should be included in the Dimension Country which could have multiple values .
Another example of same scenario is:
I have data for Period as Wk_15, Wk_16, Wk_17, W_18
Here, I need to have WoW i.e. sum(ifelse({period} = âWk_18â, DPMO, 0)) -sum(ifelse({period} = âWk_17â, DPMO, 0))
and WoW should be coming in Period Dimension
Hi @anshulsri,
Following up on the questions youâd raised in this thread. Multiple different options had been suggested, each taking a slightly different approach. Did you finally manage to solve your case and want to share your approach with the community?
If itâs not yet solved, could you please provide a more detailed description/screenshots of how your input is looking like and how your output is expected to look like? If the cardinality of the dimension that you want to compare is higher than 2, Iâd like to understand how/what you want to compare with each other (e.g. if the country column contains more than only the values âUSâ and âIndiaâ, what differences do you want to show where?).
We have not heard back from you regarding your question. We would still like to help. If we do not hear back in the next 3 days, we will archive the question.
Since we have not received a response from you on this question, we are going to archive the question. If you still need this question answered, please create a new question topic