Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Subtracting two variables in DAX

Hi Experts

 

How would you subtract the following...

 

A1 France-Benelux VPY%1 = 
Var FB = CALCULATE([NSvPY1% (Reported PY)], FILTER(
        'Reporting Hierarchy 2','Reporting Hierarchy 2'[Tweaked Franchise]="INFUSION DEVICES"), FILTER(
        'Reporting Hierarchy 2','Reporting Hierarchy 2'[Tweaked Sub Region] IN {"French Region","BENELUX Region"}))

VAR FBN =  CALCULATE([NSvPY1% (Reported PY)], FILTER(Management,Management[Level5] IN {"French Region","BENELUX Region"}))
Return
  • Hi Anonymous,

     

    What do you mean by subtracting two variables? If they are numeric, just one minus another like this FB - FBN. Can you share a dummy sample and some snapshots to make it clear, please?

     

     

    Best Regards,

2 Replies

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Anonymous,

     

    What do you mean by subtracting two variables? If they are numeric, just one minus another like this FB - FBN. Can you share a dummy sample and some snapshots to make it clear, please?

     

     

    Best Regards,

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi thanks for the feedback managed to resolve the issue

       

      VAR 1

      VAR 2

      VAR 3 = VAR 1- VAR2

      Return

      VAR 3