Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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.
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 ?
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
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)
Hi @Chanleakna123 ,
It seemed your formula could work normally in Power BI, could you have tried it? Below is my test formula:
AD = IF(OR([AB]=1,[AC]=1),1,0)
Result:
Regards,
Daniel He
@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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
76 | |
61 | |
37 | |
33 |
User | Count |
---|---|
99 | |
56 | |
51 | |
42 | |
40 |