Skip to main content

Hi Team,

I am facing issue while creating dropdown, I have used below PQL Query

CASE WHEN
RUNNING_TOTAL(SUM("PO_LINE_ITEM"."NET_VALUE_LINE_ITEM_IN_REPORTING_CURRENCY"))
 /
GLOBAL(SUM("PO_LINE_ITEM"."NET_VALUE_LINE_ITEM_IN_REPORTING_CURRENCY")) <= 0.8
 THEN 'Top 20% Vendors'
 ELSE 'Remaining Vendors'
END

while using this query in the dropdown i am getting only one option either 'Top 20% Vendors' or  'Remaining Vendors' but i want both the options in the dropdown. So pls kindly revert ASAP.

Thanks,

Kiranmayi

Hi Kiranmayi,
Try adding “OVER (PARTITION BY "PO_LINE_ITEM"."VENDOR")”
it will ensure that the Running_total is calculated per vendor rather than globally.


Hi Team,

could you help me out for the PQL query ?


CASE 
    WHEN 
        RUNNING_TOTAL(SUM("PO_LINE_ITEM"."NET_VALUE_LINE_ITEM_IN_REPORTING_CURRENCY")) 
        OVER (PARTITION BY "PO_LINE_ITEM"."VENDOR") 
        /
        GLOBAL(SUM("PO_LINE_ITEM"."NET_VALUE_LINE_ITEM_IN_REPORTING_CURRENCY")) <= 0.8 
    THEN 'Top 20% Vendors' 
    ELSE 'Remaining Vendors' 
END
 

 


Hi Team,

 

I have used above pql query which was given by you. But it is showing as attached. Running total is not working in button dropdown.

 

 


Hi Team,

 

Please help me on above mentioned

 

Thanks,

Kiranmayi


Reply