Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PowerBI-P
Frequent Visitor

DAX Calculation getting wrong

Hi all,

 

I've used below DAX for calculations for (O.Total Equi.Cases) and each row of calculations are right but total is wrong. Please advise.

 

Here O.Total Units means (Outbound[Units Desptached])

 

O.Total Equi. Cases =
IFERROR
    (
       SUMX(
             Outbound, Outbound[Units Despatched] / Outbound[Unique SKUs.Units per Case]
            )
       ,BLANK()
    ) + [O.Total Cases]

 

PowerBIP_0-1697018420005.png

Thanks,

PV

2 ACCEPTED SOLUTIONS
mohitkumawat
Super User
Super User

Try Below one Method,

Create a new Calculated Column 
 O.Total Equi. Cases =Outbound[Units Despatched] / Outbound[Unique SKUs.Units per Case]
Create a new Calculated Column 
O.Total Equi. CasesV1= [O.Total Cases]+ [O.Total Equi. Cases]

 

View solution in original post

Hi Mohitkumawat,

 

Thank you so much for your help. It's working now and you're briliant 👌.

 

I was spent lot of hours on this to resolve this issue and always trying to work on measures calcuations side but didn't think your way.

 

I should have posted my query before itself but didn't realise.

 

Once again thank you very much for your help.

 

Thanks

PV

View solution in original post

3 REPLIES 3
PowerBI-P
Frequent Visitor

Hi Mohit,

 

Hope you're doing well.

 

I need one more help please. Example of data given below and would like to find out below queries using dax.

 

Find out distinct count order no.s whatever cases/units desp and excludes 0 (Zeros).

Find out Line no.s whatever cases/units desp and excludes 0 (Zeros).

 

Hope you can understand my queires. If not, please let me know.

 

PowerBIP_0-1699540043841.png

 

I look forward to hear from you.

 

Thanks

PV

 

 

 

mohitkumawat
Super User
Super User

Try Below one Method,

Create a new Calculated Column 
 O.Total Equi. Cases =Outbound[Units Despatched] / Outbound[Unique SKUs.Units per Case]
Create a new Calculated Column 
O.Total Equi. CasesV1= [O.Total Cases]+ [O.Total Equi. Cases]

 

Hi Mohitkumawat,

 

Thank you so much for your help. It's working now and you're briliant 👌.

 

I was spent lot of hours on this to resolve this issue and always trying to work on measures calcuations side but didn't think your way.

 

I should have posted my query before itself but didn't realise.

 

Once again thank you very much for your help.

 

Thanks

PV

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.