Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

last 6 months in bar graph

hi all

actually im showing a bar graph with dimension as month for 12 months

but i need to show only 6 months data from the current month as i tried like this

created calculated dimension =If(Month > Month(AddMonths(VarToday, -6)) and Month <= Month(VarToday), Month)

but it is not working as it is showing from Apr to sep even if i select november,december

i cannot do in script part as i need to do in dimension

thanks,

Naresh

38 Replies
nareshthavidishetty
Creator III
Creator III
Author

no data to display when i use that expression

nareshthavidishetty
Creator III
Creator III
Author

sorry in calculated dimension with 2 bars when i use the expression

If(Month > Month(AddMonths(Today(), -6)) and Month <= Month(Today(), Month)

nareshthavidishetty
Creator III
Creator III
Author

sorry in calculated dimension with 2 bars when i use the expression

If(Month > Month(AddMonths(Today(), -6)) and Month <= Month(Today(), Month)

nareshthavidishetty
Creator III
Creator III
Author

sorry my mistake typo error this is what it gives me

error in  calculated dimension with 2 bars  showing in chart when i use the expression

If(Month > Month(AddMonths(Today(), -6)) and Month <= Month(Today(), Month)


sunny_talwar

Do you mind sharing an image of what you are seeing? I can understand the confidentiality concerns, but we are going nowhere brother

nareshthavidishetty
Creator III
Creator III
Author

Hi sunny sorry for late reply im sharing my image when i used

If(Month > Month(AddMonths(Today(), -6)) and Month <= Month(Today(), Month)

Trends1.png

nareshthavidishetty
Creator III
Creator III
Author

please try to help me out as i need to show today

nareshthavidishetty
Creator III
Creator III
Author

can you look at this issue

sunny_talwar

Give this a shot

If(MonthYear > MonthStart(Today(), -6)) and MonthYear <= MonthEnd(Today()), Month)