Forum Discussion

Rubal's avatar
Rubal
Helper II
7 years ago

Nested if with multiple conditions

Hi,

 

need some help with a DAX nested if statements with multiple conditions as per below

 

if Actual or Forecast = "Forecast"

then volume (cases) * growth factor and volume(SUOM) * growth factor

else if Actual or Forecast = "Actual" then volume (cases) , volume (SUOM) 

 

Thank you.

 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Rubal 

    Better give an example with actual numbers.

    It is hard to understand your requirements.

    Thanks

    A

    • Rubal's avatar
      Rubal
      Helper II

      Anonymous wrote:

      Hi Rubal 

      Better give an example with actual numbers.

      It is hard to understand your requirements.

      Thanks

      A


       ActualForecast
       Jan-18Feb-18Mar-18Apr-18May-18Jun-18Jul-18Aug-18Sep-18Oct-18Nov-18Dec-18Jan-19Feb-19Mar-19Apr-19May-19Jun-19Jul-19Aug-19Sep-19Oct-19Nov-19Dec-19
      Volume Case2323232334523232322.23.63.65.25.52.8
      Volume SUOM203020302030203030405020302030203020332436394470
      Growth Factor1111111111111111111.11.21.21.31.11.4

       

      I would have a filter for Actual and Forecast. When I select actual it will only show data available till June 19 and Forecast will show July 19 - Dec 19.

       

      Therefore, if the filter is "Actual" I get the Actual Volume and Actual Volume SUOM, However, if the filter is Forecast I will have the growth factor multiplied for the same period last year. Hope this explains the situation.