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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
aatish12345
Creator II
Creator II

Bypassing field in calculated dimension

Hi All,

I have below calculated dimension for "SalesDate" in straight table:

Aggr(Only( [SalesDate]={"=[SalesDate]<=ReportingDate"}>}[SalesDate]),
[SalesDate])...In this calculated dimension I want to bypass Region field, I have done it as shown below

Aggr({<[Region]=>} Only( [SalesDate]={"=[SalesDate]<=ReportingDate"},[Region]=>}[SalesDate]),
[SalesDate])

The expression syntax is OK but in the Region filter is still getting applied on the data.

I want to know is there any other way of bypassing the region field in order to avoid its selection on the data.

 

Aatish

Labels (1)
14 Replies
aatish12345
Creator II
Creator II
Author

Showing date field as measure is also not acceptable by users, as they are selecting date from date field in straight table., and if i use date field as measure then selection wont be possible by users

BrunPierre
Partner - Master II
Partner - Master II

Share a snippet of the output table.

aatish12345
Creator II
Creator II
Author

here I used only function on SalesDate as a measure, but qs wont allow a selection on measure data, but my users want to select SalesDate for deep analysis of data., hence i was using it as calculated dimension

BrunPierre
Partner - Master II
Partner - Master II

Only({1<[SalesDate]={"<=$(=ReportingDate)"}>} [SalesDate])

or

Aggr(Only({1<[SalesDate]={"<=$(=ReportingDate)"}>} [SalesDate]), [SalesDate])

aatish12345
Creator II
Creator II
Author

Hi Brun,

the solution : Aggr(Only({1<[SalesDate]={"<=$(=ReportingDate)"}>} [SalesDate]), [SalesDate])

is working perfectly when i bypassed region field as below:

Aggr({<Region=>}Only({1<[SalesDate]={"<=$(=ReportingDate)"},Region=>} [SalesDate]), [SalesDate])

But it is strange the same solution was not working when I used [SalesDate]={"=[SalesDate]<=ReportingDate"}>}

in the set analysis., but once I replaced it with your code i.e., [SalesDate]={"<=$(=ReportingDate)"}>} , it is working perfectly., Thanks a lot for this help. Will really appreciate your efforts.

Happy learning!

Aatish