Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I have a dataset similar to the below.
Date | ID | Percentage Complete | Index |
01/01/2022 | 1 | 10 | 1 |
02/01/2022 | 1 | 30 | 2 |
03/01/2022 | 1 | 40 | 3 |
04/01/2022 | 2 | 30 | 1 |
05/01/2022 | 2 | 50 | 2 |
06/01/2022 | 2 | 100 | 3 |
07/01/2022 | 3 | 50 | 1 |
08/01/2022 | 3 | 10 | 2 |
The index column has been created by grouping the ID's therefore each ID has a index for every occurance in data order.
I was to calculate the percentage difference from the previous index and if there is no previous index take the first percentage shown.
For example:
Date | ID | Percentage Complete | Index | Calculated % Change |
01/01/2022 | 1 | 10 | 1 | 10 |
02/01/2022 | 1 | 30 | 2 | 20 |
03/01/2022 | 1 | 40 | 3 | 10 |
Any ideas on how this can be achieved?
Many thanks
Solved! Go to Solution.
@Serdet , a new column
[Percentage] - maxx(filter(Table, [ID] =earlier([ID]) && [Index] = earlier([Index]) -1) , [Percentage ] )
@Serdet , a new column
[Percentage] - maxx(filter(Table, [ID] =earlier([ID]) && [Index] = earlier([Index]) -1) , [Percentage ] )
Is it possible to add to the above measure?
Now that I have the calculated % change. Would it be possible to compare this to another column which is (manually entered % change?
Ideally I would want the value in the calculated column to highlight red if it differs from the manual entered % change value.
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |