Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

suryajegan
Contributor

Dynamic MTD cacl

Hi

I have weekly report in which one of the calculated field i have monthtodate & networking days.

I have a filter which has the weekend dates listed. If the user looks for the previous month week info the calculated field is taking the current month to date count(Below mentioned is the formula which i used).But that is wrong.

So is it possible to make Month to Date variable to behave dynamically depends on the selected week in the filter?

Formula:

=(Sum({<[Processed_Date.autoCalendar.Month]={'$(vMonth)'},[Seg - Roll]={'Total RTF'}>}

Rolled_To_Amount_Plan))/Monthtodate*Netwrkngdaysinamonth

4 Replies
rachel_delany
Contributor

Re: Dynamic MTD cacl

Can you share the expression you are using to set the vMonth variable?

If you make this variable dynamic so that it is the month of the maximum date (which will take into account a filter) this may solve your problem.

suryajegan
Contributor

Re: Dynamic MTD cacl

below mentioned is the expression

Let vMonth=Month(Today());

suryajegan
Contributor

Re: Dynamic MTD cacl

Hi Guys,

Any suggestion?

rachel_delany
Contributor

Re: Dynamic MTD cacl

Try changing it to:

vMonth=Month(Max(Processed_Date));

Or change Processed_date to whatever the date field is that the user will be selecting.