Forum Discussion

PowerBI-P's avatar
PowerBI-P
Frequent Visitor
2 years ago
Solved

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]

 

Thanks,

PV

  • 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]

     

  • PowerBI-P's avatar
    PowerBI-P
    2 years ago

    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

3 Replies

  • mohitkumawat's avatar
    mohitkumawat
    Impactful Individual

    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]

     

    • PowerBI-P's avatar
      PowerBI-P
      Frequent Visitor

      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

  • PowerBI-P's avatar
    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.

     

     

    I look forward to hear from you.

     

    Thanks

    PV