Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
| Year | 2023-24 | 2024-25 | 2025-26 | |||
| Material Purchase | Rejection Count | % | Rejection Count | % | Rejection Count | % |
| Totals | 305 | 100.00% | 375 | 100.00% | 245 | 100.00% |
| 100 | 33 | 10.82% | 53 | 14.13% | 30 | 12.24% |
| 101 | 136 | 44.59% | 167 | 44.53% | 102 | 41.63% |
| 102 | 13 | 4.26% | 46 | 12.27% | 21 | 8.57% |
| 104 | 2 | 0.66% | 3 | 0.80% | - | 0.00% |
| 105 | 2 | 0.66% | 1 | 0.27% | 2 | 0.82% |
| 106 | 40 | 13.11% | 25 | 6.67% | 31 | 12.65% |
| 108 | 74 | 24.26% | 78 | 20.80% | 57 | 23.27% |
| 110 | 3 | 0.98% | 1 | 0.27% | 1 | 0.41% |
| 111 | - | 0.00% | 1 | 0.27% | 1 | 0.41% |
| 118 | 1 | 0.33% | - | 0.00% | - | 0.00% |
| 121 | 1 | 0.33% | - | 0.00% | - | 0.00% |
can some help to bring percentage.(the second measure will be the output)
With this input data I created a pivot table with the following parameters:
Dimension: =if(Fiscal_Year_name_Rej_PD >= '2023-24' and Material_PGr<>'-', Material_PGr)
Column: Fiscal_Year_name_Rej_PD
Measure 1: count(distinct {<Material_PGr =- {'NA'}>}Material_Date_Key)
Measure 2: count(distinct {<Material_PGr =- {'NA'}>}Material_Date_Key)/count(TOTAL <Fiscal_Year_name_Rej_PD> distinct {<Material_PGr =- {'NA'}>}Material_Date_Key)
I had to modify the first dimension due to a row appeared with Material_PGr as -. Also, for this dimension ensure to disable the Include Null Values option and activate the Show Totals.
With this, I obtain the table I think you are expecting:
Let me know if it works on your side.
Kind Regards
Daniel
To calculate the percentages in Qlik, it should be =sum([Rejection Count])/sum(TOTAL [Rejection Count]) as a measure in your table.
Is this the issue you are having or am I missing something?
Kind Regards
Daniel
if i m using =sum([Rejection Count])/sum(TOTAL [Rejection Count]) it returns overall total
My bad, I did it quickly only for one year. Try this formula:
=sum([Rejection Count])/sum(TOTAL <Year> [Rejection Count])
I obtain this table then:
The values match with the ones you posted at the beginning. Let me know if it works for you.
Kind Regards
Daniel
not working dimension1: =if(Fiscal_Year_name_Rej_PD >= '2023-24', Material_PGr)
dimension2: Fiscal_Year_name_Rej_PD
Measure: count(distinct {<Material_PGr =- {'NA'}>}Material_Date_Key)
Could you, please, share an excel with your input data? I mean, I recreated your table using the excel that is already attached, but I understand this is the output you want.
To properly check a solution, it is better to start from your input.
Kind Regards
Daniel
added 3 fields
With this input data I created a pivot table with the following parameters:
Dimension: =if(Fiscal_Year_name_Rej_PD >= '2023-24' and Material_PGr<>'-', Material_PGr)
Column: Fiscal_Year_name_Rej_PD
Measure 1: count(distinct {<Material_PGr =- {'NA'}>}Material_Date_Key)
Measure 2: count(distinct {<Material_PGr =- {'NA'}>}Material_Date_Key)/count(TOTAL <Fiscal_Year_name_Rej_PD> distinct {<Material_PGr =- {'NA'}>}Material_Date_Key)
I had to modify the first dimension due to a row appeared with Material_PGr as -. Also, for this dimension ensure to disable the Include Null Values option and activate the Show Totals.
With this, I obtain the table I think you are expecting:
Let me know if it works on your side.
Kind Regards
Daniel
But why it is not working in my dashboard....i already tried dat code
Its working when i am load in new data, but not i m existing dashboard might be becoz master calender...
thanks for your great help...and let me know if there is any solution for dat...