Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Calculate Sales by Delivery Country

Hi,   I want to calculate the Sales by Customer by Delivery Country. For example, when a random Customer is selected in the slicer, the measure needs to split Sales by Delivery Country (for example...
  • Keith-Sayer's avatar
    Keith-Sayer
    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