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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Referencing a field within a function, within a Set Analysis

Hi,

I have the following expression:

 

=

SUM({$<Data.ReportMonth1=, [Report Calendar.FinancialYear]=, MonthYear={"$(=Text(Date(AddMonths(Date#(vReportDate,'MMM YYYY'),MIN(Data.QtrReportAdj)),'MMM YYYY')))"}>}Data.QuarterActual

)

My problem seems to be when I'm trying to adjust the date. From what I can tell is happing, is the MIN(Data.QtrReportAdj) seems to be applying to all my measures, rather than just the measure.

In the example attached, if you filter by the A&E 4 hr target(excludes walk-in centres), it works fine.

Hope this makes sense.

Thank you in advance,

Simon

5 Replies
luciancotea
Specialist
Specialist

Set analysis is evaluated once for all rows, not for each row.

Not applicable
Author

Hi,

Sorry, but im a bit confused.

If I replace MIN(Data.QtrReportAdj) with -3, I get the answer for each measure, so the Set analysis works for each row. I dont get the sum off all measures.

Can you expand on what you mean

Cheers

Not applicable
Author

Hi,

Sorry, but im a bit confused.

If I replace MIN(Data.QtrReportAdj) with -3, I get the answer for each measure, so the Set analysis works for each row. I dont get the sum off all measures.

Can you expand on what you mean

Cheers

luciancotea
Specialist
Specialist

Again, MIN(Data.QtrReportAdj) is evaluated once and the evaluation = -6.

You can see the expression evaluation result if you remove the label of the expression. See attachment.

simondachstr
Specialist III
Specialist III

I think at this point you will need to introduce min(Data.QtrReportAdj) as new field in your data model.