Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
madnanansari
Creator
Creator

PNL Statement - % by Revenue calculation in Pivot table is wrong

I am working with Profit/Loss Statement. The first column shows the figures for the heads in PNL like Sales, Cost of Sales, GP, EBITDA etc. The second column is (First Column as a Percentage of Sales). 


If I am running my report for full year; the below formula will be the divider to bring the percentage:


Sum(Total {$<[PNL Head Name]={'Sales'}, [Year] = {"$(=Max(Year))"} >} [Account Balance])

If I use a table format in Qlik Sense this formula brings sales on each line; which can be used to divide the individual PNL heads to bring percentages.

This formula do not work when I use a pivot table and need a report by individual month. like Jan, Feb, Mar, ... etc in the column of the pivot. Infact it brings the total for the year in each month column which is wrong.

Can anybody guess how to resolve this issue?

1 Solution

Accepted Solutions
rubenmarin

Hi Mohammad, I suppose you have month as a vertical dimension and you want to divide for the value of each month.

In that case you need to limit the TOTAL to this field values, can you try?:

Sum(Total <Field_Used_As_Vertical_Dimension> {$<[PNL Head Name]={'Sales'}, [Year] = {"$(=Max(Year))"} >} [Account Balance])

View solution in original post

2 Replies
rubenmarin

Hi Mohammad, I suppose you have month as a vertical dimension and you want to divide for the value of each month.

In that case you need to limit the TOTAL to this field values, can you try?:

Sum(Total <Field_Used_As_Vertical_Dimension> {$<[PNL Head Name]={'Sales'}, [Year] = {"$(=Max(Year))"} >} [Account Balance])

madnanansari
Creator
Creator
Author

That's solved my issue. Thanks.