Forum Discussion
Calculate Sales first year, second year etc.
- 8 years ago
Anonymous,
You may use DAX below to add a calculated column.
Column = Table1[Year] - MINX ( FILTER ( Table1, Table1[Customernumber] = EARLIER ( Table1[Customernumber] ) ), Table1[Year] ) + 1 - 8 years ago
HI Anonymous
Sam's v-chuncz-msft formula gave the correct results when i tried it
Please see attached file
To get the average you can use
Measure = AVERAGE ( Table1[ Amount excl VAT ] )
Anonymous,
You may use DAX below to add a calculated column.
Column =
Table1[Year]
- MINX (
FILTER ( Table1, Table1[Customernumber] = EARLIER ( Table1[Customernumber] ) ),
Table1[Year]
)
+ 1
- Anonymous8 years agoNot applicable
Hi Sam and Zubair,
Thanks for your replies!
I was expecting the next result:
The result I get in PBI was:
What goes wrong?
Can you both also help me with the averages for each year? I mean the average in the first year for the 2007-customers is 20, for the 2008-customers is the average in their first year 45 and so on.
Thanks in advance,
Cor
- Zubair_Muhammad8 years ago
Community Champion
HI Anonymous
Sam's v-chuncz-msft formula gave the correct results when i tried it
Please see attached file
To get the average you can use
Measure = AVERAGE ( Table1[ Amount excl VAT ] )
- Anonymous8 years agoNot applicable
Hi Zubair,,
You're absolutely right, the formule of v-chuncz-msft works, I did something wrong with my rows and filters.
I'm sorry for that. Your average-measure also works fine, thank you and v-chuncz-msft very much!
Greeting from The Netherlands,
Cor