Forum Discussion

ooctaviano's avatar
ooctaviano
Frequent Visitor
5 years ago

Sum Totals for a Measure

Hello

 

I need help solving this issue

 

I have the following measure 

VAR Delivered_Cost = [Item_Cost]*[Qty_Rec]

I need that for totals instead of using the measure, only sums the results of the individual lines.

I've been trying to use HASONEVALUE, but no luck

 

Open to suggestions,

 

Omar Octaivano

 

1 Reply

  • dedelman_clng's avatar
    dedelman_clng
    Icon for Community Champion rankCommunity Champion

    Hi ooctaviano -

     

    Try using HASONEVALUE (or HASONEFILTER) and for the "False" expression try SUMX(Table, ItemCost*Qty_Rec).  SUMX will calculate the values for each line, then add them up at the end.

     

    If this doesn't work, please provide more information like a data model, sample data, etc. Do not do a screenshot of sample data - put it inline to the post so it is easier to copy and paste.

     

    Hope this helps

    David