Forum Discussion
Anonymous
7 years agoNot applicable
If Statements doesn't give value as expected, skips the code
Hi, I am trying to use the DAX measure and here is my scenario where IF statement gives blank for case 2 Case 1:- Material Group LBLTHT or CORSF, Material Type- ZHWA and Base UOM- EA and ROL ...
Anonymous
7 years agoNot applicable
Hi Zoe dax
Thanks for your reply!
The one you showed works for me until we do not add the case 1 code in it.. for ex. shown below: ( the below code includes both Case 1 and case 2.) This code won't work for the later part of the code which says material group= LBLTHT, Type- ZNBW and BUOM<> EA. and if it finds this combination it adds blank
I want both these cases in the same measure.
Can you please help with this?
Base UOM Highlights = Maxx( material,
IF(Material[Material group]="CORSF" || Material[Material group]="LBLTHT",
IF(Material[Material group]="CORSF" || Material[Material group]="LBLTHT",
IF(Material[Material type]="ZHWA",
IF (Material[Base Unit of Measure]<>"EA" && Material[Base Unit of Measure]<>"ROL",1,2)),
IF(Material[Material group]="LBLTHT",
IF(Material[Material group]="LBLTHT",
IF(Material[Material type]="ZNBW",
IF (Material[Base Unit of Measure]<>"EA" ,1,2))
Thanks,
Tejaswi
Anonymous
7 years agoNot applicable