Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a dimention (vendor name: A, B, C, D, ...., Z) and Payments. We are only interested on some vendors and their payemns. So i have selected VendorName as my dimention, and sum(payments) as an expression. Since we are interested on only vendors: B, D. how do i apply a filter or where clause on dimention values.
I have tried the following conditions on dimension but it did not help.
=(VendorName='B' OR VendorName='D')
= If(VendorName='B' OR VendorName='D', VendorName, NULL())
I tried apply the filter on expression but I am getting one row insted of two rows (one row per vendor) like
VendorName Sumof Payment ----- apply a filter on expression
D 30000
VendorName Sum of Payment --- I would like to see like this.
B 10000
D 20000
Thanks for your time.
Could you try this? Both options are working for me.
Expression-> Sum({<VendorName={'B,D'}>} Payment)
Dimension-> If(VendorName='B',VendorName,If(VendorName='D', VendorName))
Regards.
You should place your if statement
= If(VendorName='B' OR VendorName='D', VendorName, NULL())
in the dimension section. If you only see D as a result, it's because youonly have values for D.
If this is not the case please paste your application with sample data so we can work on it.
I did test both scenarios 1. apply the filter on dimension level , 2. at expression level. unfortunately both options did not provide me what i was looking for.. Hear is my test data and I would like to see
VendorName Payment
A 300
B 400
Pleas let me know if you have any questions.
Thanks.
Could you try this? Both options are working for me.
Expression-> Sum({<VendorName={'B,D'}>} Payment)
Dimension-> If(VendorName='B',VendorName,If(VendorName='D', VendorName))
Regards.