Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all, please assist to share the expression.
My criteria is as per below:
1. [Bill Type] = {'ZLF2'}, [KSCHL]={'Z1PR'}
2. [Billing Item] = [Billing Item2]
3. Sum [KONV_KWERT]
Try this:
Sum( {<[Billing Item] = p([Billing Item2]) , [Bill Type] = {'ZLF2'} ,[KSCHL]={'Z1PR'} >} [KONV_KWERT])
Br,
KC
else you can try this also,
sum(if([Billing Item]=[Billing Item2] and match([Bill Type],'ZLF2')=1 and match([KSCHL],'Z1PR')=1, [KONV_KWERT]))
or
if([Billing Item]=[Billing Item2],sum({<[Bill Type]={"ZLF2"},[KSCHL]={'Z1PR'}>} [KONV_KWERT]))
Regards
You can't do a row by row comparison directly using set analysis. The set filter is applied before the chart is built and not row by row.
You can use a Sum(if()) construct:
Sum({<[Bill Type] = {'ZLF2'}, [KSCHL] = {'Z1PR'}>} If([Billing Item] = [Billing Item2], [KONV_KWERT]))
Or if you have a suitable ID field, you could try:
Sum({<[SomeIDField = {"$(=[Billing Item] = [Billing Item2])"}, [Bill Type] = {'ZLF2'}, [KSCHL] = {'Z1PR'}>} [KONV_KWERT])
Or you could derive a flag field in the load script to indicate when the two fields are alike. That may not be easy in your case because they are not in the same table.