Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a P&L structure like below, but i dont want to pre define the values for subtotals such as "Net Sales revenue". Instead I want to define it as gross sales revenue - Less returns and allowances to be calculated dynamically.
Tried using sample Data. Grouped and subtracted "gross revenue - less allowance" in separate tables in backend for MTD & YTD.
Hope this is what you were looking for. If this didn't help, please share sample data. You can jumble the numbers
Output:
Regards,
Aditya
What do you mean by predefined values for "Net Sales revenue" ?
Are these values from provided screenshot fixed ? Also what formula is used to calculate allowances if you want it to be calculated dynamically ?
Regards,
Aditya
In the above screenshot all the values are fixed/hardcoded.
In my scenario, values for 'gross sales revenue ' and 'Less returns and allowances' are fixed, 'Net Sales revenue' is a calculated field with the below formula
Net Sales revenue=Gross sales revenue - Less returns and allowances
Tried using sample Data. Grouped and subtracted "gross revenue - less allowance" in separate tables in backend for MTD & YTD.
Hope this is what you were looking for. If this didn't help, please share sample data. You can jumble the numbers
Output:
Regards,
Aditya
Thanks Aditya, this solution is working. Just one followup, what if we have more than one field to add /subtract?
Will peek() work in that case also?
In that case, you will have to mention row number in peek() function of the second/third field.
For eg:
Balance - peek(Balance) - peek(Balance,-2) as Balance_New
If you want to learn how peek() works, here's the link of Qlik Support Article:
How Peek() function works - detailed explanation - Qlik Community - 1801695
If the solution helped, Please don't forget to mark it as a solution !
Regards,
Aditya