The blog is a few years old and based on QlikView, but the data model part is identical. If you download the QVW example file you can use the QlikView Converter in the Qlik Sense Dev Hub to bring it into Sense.
Just to confirm, are you trying to do a 12 Month Moving Annual Total or just limit the bar chart to the last 12 months?
If it is the former then the blog post above will deliver what you want.
If it is just limiting to the last 12 months that is different.
What is the field name of the dimension? I'm presuming that YYYYMM is the date format and not the name of the field? In the examples given above the field name should be used in place of YYYYMM. You also need to be careful of date formats in Set Analysis.