Forum Discussion
Calculate Sales by Delivery Country
- 3 years ago
Yep, so it's the same formula you are using currently with your measures, but put a "Calculate" function around them. Should look something like this:
PY_USA = Calculate(your existing previous year formula, filter('Countries', 'Countries'[name]="USA"))Same with the Previous year -1.
So, what happens is if there are no locations of a customer within the country, your total for this measure should result in 0
Keith-Sayer OK, thanks for the information. Would you happen to know if 2 new measures for Net Sales PY (Net Sales last year) and Net Sales PY-1 (Net Sales 2 years ago) which split by Delivery Country first, will eventually work?
Thanks!
Yes, that could work, too, but keep in mind that on the graph it will still make multiple lines if you are still splitting by that column on the x column, I think it's called width.
If it were me, I would keep those measures as they are on the chart and then make a few card visuals for each country (assuming you only have a certain number) OR a table visual if you have a lot of them.
- Anonymous3 years agoNot applicable
Keith-Sayer Thanks for your advice 🙂 I do want to try out the option with the measures, just to see how it looks like. Do you have an idea what the DAX-formula for this would be?
- Keith-Sayer3 years ago
Resolver I
Yep, so it's the same formula you are using currently with your measures, but put a "Calculate" function around them. Should look something like this:
PY_USA = Calculate(your existing previous year formula, filter('Countries', 'Countries'[name]="USA"))Same with the Previous year -1.
So, what happens is if there are no locations of a customer within the country, your total for this measure should result in 0