Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
Please suggest how to implement in the following case .
Dimension: VIP Issue Store
expression 1: sum of VIP salse
expression 2: sum of all sales include vipsales where Purchase store = issuestore )
layout:
Issue store | expression 1 | expression 2
A | sum( sales ) | sum(total { $<Purchase store = Issue store > } Sales )
Please suggest the appropriate expression for expression2 T^T
Many Thanks !!
Calvin Lin
Hello,
How are you identifying that your sales are VIP or not.
The first expression must return sum of VIP sales, but the expression u are using will return all sales.
You can use something like below:
exp 1: sum({<SaleType = {"VIP"}>}sales)
exp 2: sum(if(Purchase store = issuestore, sales,0))
Thanks,
Angad
Try this
Sum({<[Purchase store}={'Issue store'}, [Issue store]={'VIP'}>}TOTAL Sales)
Dear Angad,
for exp 2, your suggestion is returning sales of some vip that the issuestore is equal to the purchase store,
what if i just want the sales of all sales that the purchase store equals to the dimension in the table - issue store?
because there may exist some sales which are not made by VIP,
thus, the records do not have an issue store...
in that case, the records will be ommited...
Hello Calvin,
May be I have not understood your requirement well, but can you please try below expression:
if(Purchase store = issuestore, sum(sales),0)
Is it possible, for you to attach your qvw file or give us dummy data with expected results.
Thanks,
Angad