Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
jeckstein
Partner - Creator
Partner - Creator

Calculated Dimension for MAX monthyear

Hi,

I need to create a calculated dimension for the max(Month year) where future flag=0.

Example: today is 11/6/2016. Future flag is on 11/7/2016. I need a calculated dimension for date range 11/1/2016-11/30/2016.

But if I select Monthyear Oct-2016. I need a calculated dimension for date range 10/1/2016-10/31/2016.

I have been using set analysis like this (If this helps)

    {<MonthYearID={$(=max({<FutureFlag={0}>}MonthYearID))}>}


Thanks in advance!!!

3 Replies
MK_QSL
MVP
MVP

Provide sample data or sample app to work..

Anil_Babu_Samineni

Set Analysis, You are expecting this?

If(MonthName = GetFieldSelections(MonthName), Sum({<DateField = {'>=' & MonthStart(DateField) '<=' MonthEnd(DateField)}>} Sales))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
dineshm030
Creator III
Creator III

Hi,

May be this expression will be helping to you....


{<MonthYearID = {">=$(MonthStart(MonthYearID )<=$(MonthEnd(MonthYearID )"}>}