Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
my data record has the following fields:
Date, TranId, Item, DiscountType, NetAmt
10/1/19, 12345, dress, 20%promo,100.00
10/1/19, 12345, sweater, -(no discount), 75.00
10/1/19, 12345, top, -(no discount), 50.00
i would like to show the total Sum(NetAmt) of the transaction if one of the items has a specific DiscountType.
in the above example, this would be 225.00 for the 20%promo discount type.
how should i write the expression for a measure that would show this?
thanks.
john doub
See solution attached
thanks for your help on this.
i should have been clearer with my question.
as an example,my data record has the following fields for 3 transactions
Date, TranId, Item, DiscountType, NetAmt
10/1/19, 12345, dress, 20%promo,100.00
10/1/19, 12345, sweater, -(no discount), 75.00
10/1/19, 12345, top, -(no discount), 50.00
(total for tran 12345 =225)
10/1/19, 12346, sweater, Fallpromo, 80.00
(total for tran 12346 =80)
10/1/19, 12347, sweater, -(no discount), 60.00
10/1/19, 12347, dress, 20%promo, 80.00
(total for tran 12347 = 140)
i would like to show the total Sum(NetAmt) for the transactions where the 20%promo discount type was used.
in the above example, transactions 12345 and 12347 would qualify since one of the items in each of these transactions used the 20%promo discount type.
therefore, the sum(NetAmt) would be 225 +140 = 265
how should i write the expression for a measure that would show this?
thanks.
john doub
correction total for sum(NetAmt) should be 220+145=365