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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Selecting a calculated dimension selects more than I want.

I have a table with a calculated diminsion.  When I click on the diminsion of one record, it selects all the months and other fields that are used in the calculated dimension.  The calcualted dimension is an if statement that when true gives the value of a field. 

=if((BLMonth1<=CurrentDocumentMonth3 or BLYear<"CurrentDocumentYear" or BLMonth=0) and BLYear<="CurrentDocumentYear",GL_Account_Number_Name_Balance_Sheet3)

When I click in the table, I only want the GL_Account_Number_Name_Balance_Sheet3 to be selected.  Is there away to do this?

12 Replies
vgutkovsky
Master II
Master II

Ah, I misunderstood and assumed these 2 fields were variables. I'm assuming you're forcing the users to always select exactly 1 CurrentDocumentYear and 1 CurrentDocumentMonth3? In that case, give this expression a try:

sum({<balcode3={'ACTUAL'},[code3]={'RBIACCT'},BLYear={"<=$(=CurrentDocumentYear)"}>*(<BLMonth1={"<=$(=CurrentDocumentMonth3)"}>+<BLYear={"<$(=CurrentDocumentYear)"}>+<BLMonth={0}>)} Tot3)

Not applicable
Author

That still didn't quite do it Vlad.  For whatever reason, it doesn't change with a selection of current document month.  It changes with year, but the values not quite right.

Without the equal signs we just added, it had the right vale for the time that is after the current month.

Not applicable
Author

Actually, I think it does work.  I just have to change one of the selectors format.  It might not be able to evaluate it the same in an expression as a calculated dimension.  I just tried changing BLMonth1 which is in '01-FEB' format (Feb is our 1st fiscal month) to BLMonth which is like '1' format.  I give it the single number of the month as selector and it works!