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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
greend21
Creator III
Creator III

Calculated Dimension or Set Analysis?

I've created a pivot table that shows department, month, and year dimensions and has three expressions for the totals columns. I want the chart to only show 3 months of data, with this always being the most recent three months of data.

Can this be done with a calculated dimension rather than set analyis? I think I would need to add a set expresssion to ALL three expressions right? I'd rather avoid that if possible due to formatting in the expression to make it show as hh:mm:ss.

Any tips are appreciated!

Labels (1)
5 Replies
sunny_talwar
MVP
MVP

You can do it if MonthYear or Date is your dimenion

greend21
Creator III
Creator III
Author

Can you provide an example how? I was trying and kept getting "error in calculation." Month and year are both dimensions in this particular chart. I have specific dates available in my data too.

sunny_talwar
MVP
MVP

May be like this

If(MonthYear >= Max(TOTAL MonthYear, 3), MonthYear)

and then check 'Suppress When Value is Null'.

greend21
Creator III
Creator III
Author

This provides only null values

sunny_talwar
MVP
MVP

Won't know until I see what you have