I have a dataframe that has the following structure.
ProdID Date class price set
PD-10011 2021-05-01 10:12:16 Regular 1000 ZR
PD-10712 2021-05-02 18:12:06 Premium 1000 ZR
PD-10213 2021-05-02 16:02:59 Premium 1000 ZR
PD-10814 2021-05-03 17:12:06 Premium 1000 RS
PD-10315 2021-05-04 19:10:11 Other 1000 RR
PD-10616 2021-05-04 13:18:14 Expired 1000 ZR
PD-10617 2021-05-04 15:14:19 Regular 1000 ZR
I need to create a funnel view by utilizing the data frame considering the following conditions:
May-21, the month should be auto-populating based on Date. If there are records of multiple months then it should be sequenced by month in descending month order. Here, Total
is count of Total unique ProdID for that particular month. Regular
is the count and sum of those ProdID having class as "Regular" and similar logic for the "Premium" row. The miscellaneous
row is a count of ProdID having classes other than "Regular" and "Premium". RS (Premium)
is count and sum of those where the class is "Premium" along with set as "RS".
May-21 Count of ProdID Percentage Count Sum of Price Percentage Sum
Total 7 100.00% 7000 100.00%
Regular 2 28.57% 2000 28.57%
Premium 3 42.85% 3000 42.85%
miscellaneous 2 28.57% 2000 28.57%
RS (Premium) 1 33.33% 1000 33.33%