Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

DAX Query - Multi-conditional IF statement

Hi, 

 

I am trying to write the following in DAX, but am running into a lot of syntax issues and also having difficulty getting my DAX to correctly recognise Tables and Columns with a lot of text showing up Grey. 

 

IF('(2) Time Structure'[Quarter] =("Q1"),["0"])&('(2) Reporting Cycles'[Reporting Cycle]="Actuals 2022")&('(2) Latest Actuals'[Month]>=3),("Q1", calculate('(1f) Headcount'[Vol Leavers positive]/ '(1f) Headcount'[HC Op w PF Adj] *4, '(2) Time Structure'[Quarter] IN {"Q1"}),(BLANK())
 
This formula is then repeated 3 more times for "Q2", "Q3", and "Q4".
 
At a very basic level I want it to say: 
 
If (Quarter = Q1) & (Reporting Cycle = Actuals 2022) and (Latest Month is greater or equal to 3), then perform the calculation, if not then give value of ("0"). 
 
Thanks