if CHECK ENGINE indicator ON, retrieve the code, if not, there are tons of possibilities to cause this symptom. Nissan has a lot TSBs to deal with this kind misfire troubles. Replace all 6 ignition coils, replace all fuel injectors, check wiring harness close to the firewall because intermittent continuity, or ground cable poor connection between engine and body, or body to battery negative cable, and knock sensor is common failure for this engine, many more etc... ANYWAY CHECK CODE FIRST.
HTH.