Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
hildacgg
Creator
Creator

Ignore dimension for budget

I have sales, backlog and booking data which each record contains a date, product number and amount. and I have a quarterly budget which it doesn't have any date associated with. I am trying to create a chart by month but the budget data is not calculating.

Here is my table:

      

MonthBookings $Backlog $SalesBudgetRowNo()
138,5011,000175,00001
25,4232,1006,00002
38,4563,00010003
405,000004
504,000005
60300006
70200007
80100008
9050009
1001000010
1101000011
120000

12

Budget Data (Sample):

     

Product NbrQ1Q2Q3Q4
A100110141177.1
B200220282354.2
C505570.588.55
B500550705885.5
E100110141177.1

I am using a calculated dimension: Month:

=if(ColumnNo()=5,RowNo(),Month)

and for my budget column (Column 5) I have tried several expressions:

One:

sum({<Month=>}if(RowNo() = 1 or RowNo()= 2 or RowNo = 3,Q1/3))

Two:

if(RowNo() = 1 or RowNo()=2 or RowNo = 3,sum({<Month=>}Q1 /3))

But still it doesn't show any numbers. Please help...

8 Replies
sunny_talwar

Not sure I understand the use of your calculated dimension?? Would you be able to share a qvw sample to look at this?

rammarthi
Creator
Creator

First read the Budget data as below using crosstable function and resident with preceding load:

Prduct Nbr,  Quarter,  QtrStrtDate,  QtrEndDate, Budget

Use interval match to match date from (Here is my table:) between QtrStartDate and QtrEndDate. Now you will get a resultant table like this

Prduct Nbr,  Quarter,  QtrStrtDate,  QtrEndDate, Budget, Bookings, Backlog, Sales.


Regards

Ram

Colin-Albert

Hi Hilda,

Your budget is Quarterly, so the budget could be assigned to the first or last date in the quarter, or you could apportion 1/3 of the Quarter bufget to each month in the budget. Then your monthly sales will have a budget for comparison.

I would do this by concatenating the budget data to your sales data with a new column for the budget value.

If you post an example QVW this would help.

hildacgg
Creator
Creator
Author

I could only assign one date to the budget:

      

Product NbrQ1Q2Q3Q4Date
A100110141177.11/15/2018
B200220282354.21/15/2018
C505570.588.551/15/2018
B500550705885.51/15/2018
E100110141177.11/15/2018

'

This will assign everything to the first quarter, first month... I can NOT assign several dates to each record.

This is sample data but I have hundreds of columns and millions of records a cross table will not be effective.

zebhashmi
Specialist
Specialist

Not sure but try to charge this


if(RowNo() = 1 or RowNo()=2 or RowNo = 3,sum({<Month=>}Q1 /3))

to

Sum({<RowNo() ={1,2,3}>}yourField)

Your cross table is transfromed?

Colin-Albert

Hi Hilda,

You need to use the crosstable function to unpivot your budget data so you get something like

Product      Qtr      Budget

A               Q1          100

A               Q2          110

A               Q3          141

A               Q4          177.1

B               Q1          200

B               Q2          220

etc

Then you can apportion the quarter values into months by dividing by 3.

This assumes that the Quarterly budget is linearly apportioned to each month in the quarter.

Also for completeness you should include a Year field in your sales & budget data.

Colin-Albert

Have a look at this thread showing how to handle sales & budgets with different levels of granularity

Budget table with different granularity

hildacgg
Creator
Creator
Author

It will create a Syntetic key with my calendar because my key is the Date itself like 1/1/18