Formula ?? Constipation

Esmeralda

My little one is on similac advance. She is almost 6 wks . She will poop fine some days and then will go days without, she has a really hard time going. She gets fussy and pushes and pushes, to the point where she gets red , and nothing comes out . She does pass a lot of gas!

Could it be the formula causing her to get constipated? Should we switch ?