Forum Discussion
Divide 2 values on the same column?
Your calculation is apparently incorrect, for example, (4-2)/2 = 100%
Please create an index column in Power query and use the following measure:
- Vladracs3 years agoHelper I
Hi, I'll give it a try it looks like it's going to work.
Just the calculation is not what I want 🙂 I want to know the difference in percentage from one value to the next, 4 is 200% of 2, it's just 4/2- Padycosmos3 years agoSolution SageYou may try thisPct change =VAR pval=LOOKUPVALUE('Table'[Variable_Value],'Table'[Index],SELECTEDVALUE('Table'[Index])-1)RETURNDIVIDE(CALCULATE(sum('Table'[Variable_Value]),ALLSELECTED('Table'[Index])),pval)
- Vladracs3 years agoHelper I
Hi I am trying to understand how can I create a index that is "dynamic" meaning it will change based on the slicer.
If I add a fixed item column , when I filter the formulas above dont reflect what I need as they will still show an entry that is not on the filtered (sliced) table at the final page 😕- Padycosmos3 years agoSolution Sage
Well. instead of index, you can try creating a Rank. These 3 videos can give you an idea:
https://www.youtube.com/watch?v=3IHsIngGdjU
- Vladracs3 years agoHelper I
Thanks for the hint on rankx, I can use it well to create ranks, but doesnt help me solve the original problem. It's crazy as this is a simple math dividing 2 rows...but in powerbi and dynamic tables, it seems like a lot of hassle 😕