Forum Discussion

Gopinath_iyer's avatar
Gopinath_iyer
Helper II
4 years ago

help in calculation

Hi All,

 

I need you help/suggestion in acheiving the below result. my data has multiple rows for a product with same amount repeating. How would i show the category wise sum of amount but each product to be consider only once. So in this example output should be Furniture = 300 and Office Supplies = 450.

 

CategoryProductAmount
FurnitureA100
FurnitureA100
FurnitureB200
FurnitureB200
FurnitureB200
Office suppliesC250
Office suppliesC250
Office suppliesD200
Office suppliesD200
Office suppliesD200

 

4 Replies

  • Gopinath_iyer , Create a measure like

     

    sumx(summarize(Table,[Category],[Product],[Amount]), [Amount])

     

    or remove duplicate in power query

  • Hi,

    To your matrix visual, drag Category to the row labels.  Write these measures

    Measure1 = min(data[Amount])

    Measure2 = sumx(summarize(data,data[category],data[product],"ABCD",[measure1]),[abcd])

    Drag Measure2 to your visual.

    Hope this helps.