Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Keitaru
Creator II
Creator II

Dynamically Displaying 0 Data Date on Chart via rolling-N month window.

Hi All,

Need some help with my current issue

Screenshot of default look of data that I have 
Keitaru_0-1717578376672.png

What I'm trying to achieve. Is to be able to show Future Dates via selection of MonthYr to display running 12 months data based on vMaxMonth

I've Created a calculated table based off the data within my company's UAT server also Left Join another table to it based off the Master Cal attached Trade_count = 0 to MonthName.

TradeCount:
Load 	MonthName,
	order_contract_orderstatus 	AS Trade_Count_Status,
        OTC_FLAG 			AS T_OTC_FLAG,
        STP_FLAG			AS T_STP_FLAG,
	alt(count(ordercontractid),0) 	AS Trade_Count
Resident MVP1
Group by MonthName, order_contract_orderstatus, OTC_FLAG, STP_FLAG
Order by MonthName desc;

LEFT JOIN(TradeCount)

Future_Data:
Load  MonthName,
      0 As Trade_Count	
Resident Master_Cal;


To get the table below

NoConcatenate
Final_Trade_Count:
Load	MonthName,
	Trade_Count_Status,
        T_OTC_FLAG,
        T_STP_FLAG,
	Trade_Count 
Resident TradeCount;
Drop Table TradeCount;

Where the table look some what like this

Keitaru_1-1717579299431.png


Current Dynamic Rolling-N Month Chart script looks like this.

alt(Sum( {1<Trade_Count_Status={'Settled'}, Date ={">=$(=Date(AddMonths(vMaxMonth,-11),'DD/MM/YYYY')) <=$(=Date(AddMonths(vMaxMonth,0),'DD/MM/YYYY'))"}>} Trade_Count),sum({1< Date ={">=$(=Date(AddMonths(vMaxMonth,-11),'DD/MM/YYYY')) <=$(=Date(AddMonths(vMaxMonth,0),'DD/MM/YYYY'))"}>} 0))

vMaxMonth  =Date(max(order_contract_tradedate),'DD/MM/YYYY')

When ever i select a MnthYr be it future or past data i get the following output:
Instead of showing me 12 month rolling period with 0 date Data showing and past month showing, nothing is being displayed.

Keitaru_2-1717579696030.png

 

Please Help.
As I'm on enterprise QS I cant share qvf due to security issues.

 

Labels (2)
1 Solution

Accepted Solutions
Keitaru
Creator II
Creator II
Author

Manage to solve this on my own after changing the Date Tagging Logic.

View solution in original post

1 Reply
Keitaru
Creator II
Creator II
Author

Manage to solve this on my own after changing the Date Tagging Logic.