Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
poklegoguy
Creator
Creator

Repeat monthly values at day level

Hi, please help me with my problem. I have a Target field in my dataset and it is separated monthly as screenshot below:

poklegoguy_0-1728032228316.png

here's the thing, I need to create a table where date (every day of a month) is one of my dimension and I will need the Target as one of my measures. I need the Target value to be repeated at every date row in the month as screenshot below:

poklegoguy_1-1728032413083.png

I have tried expression below:
SUM({$<Month={"$(=Month(Day))"}>} Target

Unfortunately, it doesn't work and I can't find any solution online. I'll appreciate any help! Thanks!

 

Labels (1)
13 Replies
hanna_choi
Partner - Creator
Partner - Creator

How about this?

Target table has year, month, target fields.

Sales table has date, sales fields.

hanna_choi_0-1728350660517.png

 

hanna_choi_1-1728350725705.png

 

Kushal_Chawda

@poklegoguy  Do you mean Target data is captured for Month end date? If your target data is stored in different file you need to link the Month of the target file with Month of the Sales data. If you have Calendar linked to your Sales data, you need to link Month field of the Target with Month Field of the Calendar.

sales_data:

LOAD Date,

          Month(Date) as Month,

          Sales

FROM sales_table:

Target_data:

LOAD month(Date#(Month,'MMM')) as Month,

          Target

FROM Target_table;

If this is your data structure, what expression I have provided should work

Qrishna
Master
Master

you can use your desired field in the script, just replace the field i used with your desired field. it was just to guide you,unless you provide all the necessary info we cannot do much with it.

SunilChauhan
Champion II
Champion II

Test:

Load Day, Sales

month( day)  as  Month   

From secondtablepath;

Left join

Load 

Num(Month) as Month ,

Target

From firsttablepath;

 

Hope this helps

 

Sunil Chauhan