Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi All;
Here's my delemia:
I have a list of companies, and data that is PER year for 5 years. In matrix form, I have the years accross the top and the company's listed down the side. In each year column, is a a figure - this is a stand alone number that is not to be summed, totaled or in a running balance.
example:
20000 2001 2002 2003 2004
Xyz 10 2 -3 21 5
ABC -6 0 5 2 -1
Easy 18 21 35 40 40
What I need is to show the % of change from one year to the next.
I think I need to do a measure where I say something like:
'00-01%chg = CALCULATE [field number], SAMEPERIODLASTYEAR [Year]
and than do another measure
Var=[field number]-SAMEPERIODLASTYEAR [Year],DIVIDED [field number]
Of course the above doesn't work.....in excel I'd just create a column between each year, put the formula of =Sum(a12-c12)/a12
Thanks for your help
Solved! Go to Solution.
Hi @Anonymous
Do you like something like this?
Create measures
Measure = CALCULATE(SUM(Sheet7[value]),FILTER(ALLEXCEPT(Sheet7,Sheet7[company]),Sheet7[year]=MAX(Sheet7[year])-1)) Measure 2 = (SUM(Sheet7[value])-[Measure])/SUM(Sheet7[value])
If so, please let me know how you would like to handle the "infinity" value.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Do you like something like this?
Create measures
Measure = CALCULATE(SUM(Sheet7[value]),FILTER(ALLEXCEPT(Sheet7,Sheet7[company]),Sheet7[year]=MAX(Sheet7[year])-1)) Measure 2 = (SUM(Sheet7[value])-[Measure])/SUM(Sheet7[value])
If so, please let me know how you would like to handle the "infinity" value.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Maggie;
As I've been searching for how to correct the formula, I wonder if my Year field is the issue? Right now its formated as "Whole Number". When I change it to Date, all my years become 1905 (regardless of what Year it actaully is).
Also note that when my Year column in visually used as a column (vs as a label accross the top) it displays as 6048 (regardless of what Year it actaully is).
Thank you
Hi Maggie,
Thanks for your reply - sorry for not responding sooner, its been a crazy week
The short answer is yes, you have created what I'm looking to accomplish - only 'Measure' keeps returning an error in the formulation - I've tried various things to fix it, but I'm not sure what the =MAX('Sheet7'[year])-1) does.
right now I have -
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |