5 Replies Latest reply: Mar 19, 2018 9:19 AM by Sasidhar Parupudi RSS

    Multiple IF's in Set Analysis

    Dan Coen

      Hi, I need multiple if statements in a measure based on dimensions selected. For example if you pick from [Fiscal - Year], [Fiscal - Quarter Id], or [Fiscal - Period Id], the corresponding measures should be calculated. Im not sure what the syntax would be though.



      GetSelectedCount([Fiscal - Year])>0,

      round(Sum({$<[Fiscal - Year]={$(=Max([Fiscal - Year])-1)},[Filter - Date Context]={'Shipped'}>}[Amount - Shipped/Fulfilled USD])))



      GetSelectedCount([Fiscal - Quarter Id])>0,

      round(Sum({$<[Fiscal - Quarter Id]={$(=Max([Fiscal - Quarter Id])-4)}>}[Amount - Shipped/Fulfilled USD])))



      GetSelectedCount([Fiscal - Period Id])>0,

      round(Sum({$<[Fiscal - Period Id]={$(=Max([Fiscal - Period Id])-12)}>}[Amount - Shipped/Fulfilled USD])))