Forum Discussion
Dax Help on Condition IF or OR
Hi everyone .
i'm working on Condition dax which a bit complicate over here and i have never experienced this before.
We have code , must have SKU etc.. and Count. in this case , BI will count all number and sum together over the different code provide. but i wanna have exceptional over few codes.
Look at yellow highlight on 1317 count 1 , 1108 count 1 , both of them will be 2 as calculation.
but this is exeption : IF 1317 count 1 and 1108 count 1 both of them will count only 1 ,
IF 4295 count 1 and 2239 count 1 both of them will count only 1
For the rest let's calculate as normal sum.
and i used below calculation as BI Team's mentioned . and when i do testing filter on code number that i put together with Customer Code , it turn out to wrong number , actually the right data is 4295= 1 , 2239= 1 = Total 1
it should not be the number as 8 , 9 or 10 , it's not as expected. because my original data only show count 1 on each customer code with Code , can you please help to correct this? i'm looking forward.
5 Replies
- v-danhe-msft
Microsoft Employee
Hi Chanleakna123 ,
but this is exeption : IF 1317 count 1 and 1108 count 1 both of them will count only 1 ,
IF 4295 count 1 and 2239 count 1 both of them will count only 1
For the rest let's calculate as normal sum.
I could not figure out how could you count the number? Could you please post your desired result if possible?
Regards,
Daniel He
- Chanleakna123
Post Prodigy
HI v-danhe-msft really thanks for your response ,
I have the calculation in Excel as per yellow highlight ,
i have different code numbers , and you see Green Column , means the calcuation of below.
ANY Coke 1.5L OR 2.25L =IF(OR(V5=1,W5=1),1,0)
- Chanleakna123
Post Prodigy
v-danhe-msft , hi you get what i mean ? Or do i need more explanation to acheive this ?
Your response is really a big help now to my side.
- Chanleakna123
Post Prodigy
HI All ,
Can somebody helps me using Dax over IF & OR ,
I have Code , Material Description , Count and Customer Code & Name ,
* You see the Code number 4223 count 1 , and 1300 Count 1 ,
If i Visualize customer code with Code number and count columns , these will sum up together Total : 2*But i wanna set Condition , If 4223 Count 1 , 1300 Count 1 , Total 1 only
and this is the calculation i used on Excel Total =IF(OR(V5=1,W5=1),1,0)
For the rest let's calculate as Normal Sum
and i have repeatedly Code number to be repeadted on Excel . Can i cook this in BI ?