Forum Discussion
vmsouza30
9 years agoHelper I
Calculation with the variables
In my table there is a grouping (Group 1,2,3) composed of several clients that are not repeated and the only field that is modified is the field "FACTOR". Since my base client is client "E", and...
- 9 years ago
Hi,
Maybe you could try these formulas.
Above = VAR E2014 = CALCULATE ( MIN ( Table1[Factor2014] ), FILTER ( ALL ( Table1 ), 'Table1'[Clients] = "E" ) ) VAR E2015 = CALCULATE ( MIN ( Table1[Factor2015] ), FILTER ( ALL ( Table1 ), 'Table1'[Clients] = "E" ) ) VAR E2016 = CALCULATE ( MIN ( Table1[Factor2016] ), FILTER ( ALL ( Table1 ), 'Table1'[Clients] = "E" ) ) RETURN CALCULATE ( COUNTROWS ( Table1 ), FILTER ( Table1, 'Table1'[Factor2014] > E2014 || 'Table1'[Factor2015] > E2015 || 'Table1'[Factor2016] > E2016 ) )
Below = VAR E2014 = CALCULATE ( MIN ( Table1[Factor2014] ), FILTER ( ALL ( Table1 ), 'Table1'[Clients] = "E" ) ) VAR E2015 = CALCULATE ( MIN ( Table1[Factor2015] ), FILTER ( ALL ( Table1 ), 'Table1'[Clients] = "E" ) ) VAR E2016 = CALCULATE ( MIN ( Table1[Factor2016] ), FILTER ( ALL ( Table1 ), 'Table1'[Clients] = "E" ) ) RETURN CALCULATE ( COUNTROWS ( Table1 ), FILTER ( Table1, 'Table1'[Factor2014] < E2014 || 'Table1'[Factor2015] < E2015 || 'Table1'[Factor2016] < E2016 ) )
Best Regards!
Dale
Anonymous
9 years agoNot applicable
I think you are going to want to reshape your data. Likely you will find it easier to deal with a single factor column, and a separate year column. (You can use the Unpivot functionality in Edit Queries for this).
I'm also skeptical that you are going to want comma separated values like that...
vmsouza30
9 years agoHelper I
In this case I do not have to worry about separating the factor in date, here could be Factor1, factor2, etc.
My problem is to have the reference index of a client and do the calculations, as explained above.
My problem is to have the reference index of a client and do the calculations, as explained above.