Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Average and sum Dax

Hi All, I have issues with to get the Divide and Sum Function. Please look into the sample model below Table Mat             code           Sales  12              a1                  10 12...
  • Ashish_Mathur's avatar
    7 years ago

    Hi,

    Write these measures:

    Total Sales = SUM(Data[Sales])

    Number of codes = DISTINCTCOUNT(Data[code])

    Measure = SUMX(VALUES(Data[Mat]),[Total sales]/[Number of codes])

    Hope this helps.